Changeset 716


Ignore:
Timestamp:
Aug 7, 2022, 10:54:11 AM (3 years ago)
Author:
Paul Smedley
Message:

Fix warnings

Location:
GPL/branches/uniaud32-next
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/alsa-kernel/core/init.c

    r715 r716  
    886886                        return err;
    887887                card->registered = true;
    888 #ifndef TARGET_OS2
    889888        } else {
    890889                if (card->managed)
    891890                        devm_remove_action(card->dev, trigger_card_free, card);
    892 #endif
    893         }
    894 
    895 #ifndef TARGET_OS2
     891        }
     892
    896893        if (card->managed) {
    897894                err = devm_add_action(card->dev, trigger_card_free, card);
     
    899896                        return err;
    900897        }
    901 #endif
     898
    902899        err = snd_device_register_all(card);
    903900        if (err < 0)
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/memalloc.h

    r710 r716  
    8383struct snd_dma_buffer *snd_devm_alloc_pages(struct device *dev, int type,
    8484                                            size_t size);
     85#ifdef TARGET_OS2
     86int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab);
     87void *snd_malloc_sgbuf_pages(struct device *device,
     88                             size_t size, struct snd_dma_buffer *dmab,
     89                             size_t *res_size);
     90
     91#endif
    8592#endif /* __SOUND_MEMALLOC_H */
    8693
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_realtek.c

    r711 r716  
    52155215}
    52165216
     5217#ifdef NOT_USED
    52175218static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
    52185219                                      const struct hda_fixup *fix,
     
    52285229}
    52295230
    5230 #ifdef NOT_USED
    52315231static void alc_update_coef_led(struct hda_codec *codec,
    52325232                                struct alc_coef_led *led,
     
    75937593};
    75947594
     7595#ifdef NOT_USED
    75957596/* A special fixup for Lenovo C940 and Yoga Duet 7;
    75967597 * both have the very same PCI SSID, and we need to apply different fixups
     
    76097610        __snd_hda_apply_fixup(codec, id, action, 0);
    76107611}
     7612#endif
    76117613
    76127614#ifdef TARGET_OS2
  • GPL/branches/uniaud32-next/include/linux/device.h

    r710 r716  
    292292#define devm_kzalloc(A, B, C) kzalloc(B, C)
    293293#define devm_kmalloc(A, B, C) kmalloc(B, C)
    294 #define devm_kcalloc(A, B, C, D) kmalloc(B, C, D)
     294#define devm_kcalloc(A, B, C, D) kmalloc(B, C)
    295295#define devm_kmalloc_array(A, B, C, D) kmalloc_array(B, C, D)
     296
     297
     298/* allows to add/remove a custom action to devres stack */
     299int devm_add_action(struct device *dev, void (*action)(void *), void *data);
     300void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
    296301#endif /* _LINUX_DEVICE_H */
    297302
  • GPL/branches/uniaud32-next/include/linux/pci.h

    r713 r716  
    772772int pcim_enable_device(struct pci_dev *pdev);
    773773#define pcim_iomap pci_iomap
     774int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
    774775#endif /* LINUX_PCI_H */
  • GPL/branches/uniaud32-next/include/linux/string.h

    r615 r716  
    3030#define vmemdup_user memdup_user
    3131#define scnprintf snprintf
     32ssize_t strscpy(char *dest, const char *src, size_t count);
     33
    3234#endif
    3335
  • GPL/branches/uniaud32-next/lib32/devres.c

    r615 r716  
    3636};
    3737
     38#define devres_log(dev, node, op)       do {} while (0)
     39
    3840/*
    3941 * Release functions for devres group.  These callbacks are used only
     
    7577
    7678#define devres_log(dev, node, op)       do {} while (0)
     79
     80static void add_dr(struct device *dev, struct devres_node *node)
     81{
     82        devres_log(dev, node, "ADD");
     83        BUG_ON(!list_empty(&node->entry));
     84//#ifndef TARGET_OS2
     85        /* Traps here on OS/2 */
     86        list_add_tail(&node->entry, &dev->devres_head);
     87//#endif
     88}
     89
     90/**
     91 * devres_add - Register device resource
     92 * @dev: Device to add resource to
     93 * @res: Resource to register
     94 *
     95 * Register devres @res to @dev.  @res should have been allocated
     96 * using devres_alloc().  On driver detach, the associated release
     97 * function will be invoked and devres will be freed automatically.
     98 */
     99void devres_add(struct device *dev, void *res)
     100{
     101        /* Traps here on OS/2 */
     102        struct devres *dr = container_of(res, struct devres, data);
     103        unsigned long flags;
     104        spin_lock_irqsave(&dev->devres_lock, flags);
     105        add_dr(dev, &dr->node);
     106        spin_unlock_irqrestore(&dev->devres_lock, flags);
     107}
    77108
    78109/**
     
    273304        return NULL;
    274305}
     306
     307/**
     308 * devm_add_action() - add a custom action to list of managed resources
     309 * @dev: Device that owns the action
     310 * @action: Function that should be called
     311 * @data: Pointer to data passed to @action implementation
     312 *
     313 * This adds a custom action to the list of managed resources so that
     314 * it gets executed as part of standard resource unwinding.
     315 */
     316int devm_add_action(struct device *dev, void (*action)(void *), void *data)
     317{
     318        return 0;
     319}
     320
     321/**
     322 * devm_remove_action() - removes previously added custom action
     323 * @dev: Device that owns the action
     324 * @action: Function implementing the action
     325 * @data: Pointer to data passed to @action implementation
     326 *
     327 * Removes instance of @action previously added by devm_add_action().
     328 * Both action and data should match one of the existing entries.
     329 */
     330void devm_remove_action(struct device *dev, void (*action)(void *), void *data)
     331{
     332}
  • GPL/branches/uniaud32-next/lib32/driver.c

    r715 r716  
    2626#include "base.h"
    2727
    28 #define devres_log(dev, node, op)       do {} while (0)
    29 
    30 struct devres_node {
    31         struct list_head                entry;
    32         dr_release_t                    release;
    33 #ifdef CONFIG_DEBUG_DEVRES
    34         const char                      *name;
    35         size_t                          size;
    36 #endif
    37 };
    38 
    39 struct devres {
    40         struct devres_node              node;
    41         /* -- 3 pointers */
    42         unsigned long long              data[1];        /* guarantee ull alignment */
    43 };
    44 
    45 
    4628/**
    4729 * dev_set_name - set a device name
     
    6042}
    6143
    62 static void add_dr(struct device *dev, struct devres_node *node)
    63 {
    64         devres_log(dev, node, "ADD");
    65         BUG_ON(!list_empty(&node->entry));
    66         list_add_tail(&node->entry, &dev->devres_head);
    67 }
    68 
    69 /**
    70  * devres_add - Register device resource
    71  * @dev: Device to add resource to
    72  * @res: Resource to register
    73  *
    74  * Register devres @res to @dev.  @res should have been allocated
    75  * using devres_alloc().  On driver detach, the associated release
    76  * function will be invoked and devres will be freed automatically.
    77  */
    78 void devres_add(struct device *dev, void *res)
    79 {
    80 #ifndef TARGET_OS2
    81         /* Traps here on OS/2 */
    82         struct devres *dr = container_of(res, struct devres, data);
    83         unsigned long flags;
    84 
    85         spin_lock_irqsave(&dev->devres_lock, flags);
    86         add_dr(dev, &dr->node);
    87         spin_unlock_irqrestore(&dev->devres_lock, flags);
    88 #endif
    89 }
     44
    9045
    9146static struct device *next_device(struct klist_iter *i)
Note: See TracChangeset for help on using the changeset viewer.