[PATCH] staging: greybus: audio: constify snd_soc_dai_ops structures
snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by work with const snd_soc_dai_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav--- drivers/staging/greybus/audio_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 25c8bb4..a6d01f0 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -674,7 +674,7 @@ static int gbcodec_mute_stream(struct snd_soc_dai *dai, int mute, int stream) return ret; } -static struct snd_soc_dai_ops gbcodec_dai_ops = { +static const struct snd_soc_dai_ops gbcodec_dai_ops = { .startup = gbcodec_startup, .shutdown = gbcodec_shutdown, .hw_params = gbcodec_hw_params, -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8192e: Change fixed function names with "%s: ", __func__
On Fri, Aug 18, 2017 at 11:53:41PM +0800, 张树荣 wrote: > From: Shurong Zhang> > Replace hard-coded function names in strings with "%s", __func__ > in the dot11d.c file. Issue found by checkpatch.pl. > > Signed-off-by: Shurong Zhang > --- > drivers/staging/rtl8192e/dot11d.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) This patch doesn't apply at all, are you sure you generated it correctly? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging:wlan-ng Fix Multiple line dereference
On Fri, Aug 18, 2017 at 06:16:39PM +0530, Janani S wrote: > This patch fixes multiple line dereference warning reported > by checkpatch script. > > Signed-off-by: Janani S> --- > drivers/staging/wlan-ng/hfa384x_usb.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c > b/drivers/staging/wlan-ng/hfa384x_usb.c > index ee5fa86..2746e13 100644 > --- a/drivers/staging/wlan-ng/hfa384x_usb.c > +++ b/drivers/staging/wlan-ng/hfa384x_usb.c > @@ -1345,15 +1345,11 @@ static int hfa384x_usbctlx_complete_sync(struct > hfa384x *hw, > kfree(ctlx); > } else if (mode == DOWAIT) { > struct usbctlx_cmd_completor completor; > + struct usbctlx_completor *cmplt; > > - result = > - hfa384x_usbctlx_complete_sync(hw, ctlx, > - init_cmd_completor(, > - > > - inbuf. > - cmdresp, > - > > - result)); > + cmplt = init_cmd_completor(, >inbuf.cmdresp, > +>result); > + result = hfa384x_usbctlx_complete_sync(hw, ctlx, cmplt); > } > > done: Someone else sent this same patch right before you did, sorry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: media: Release the correct resource in an error handling path
'res' is reassigned several times in the function and if we 'goto error_unmap', its value is not the returned value of 'request_mem_region()' anymore. Introduce a new 'struct resource *' variable (i.e. res2) to keep a pointer to the right resource, if needed in the error handling path. Fixes: 4b4eda001704 ("Staging: media: Unmap and release region obtained by ioremap_nocache") Signed-off-by: Christophe JAILLET--- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 6a3434cebd79..8d2d3f8edc07 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1791,7 +1791,7 @@ vpfe_ipipe_init(struct vpfe_ipipe_device *ipipe, struct platform_device *pdev) struct v4l2_subdev *sd = >subdev; struct media_entity *me = >entity; static resource_size_t res_len; - struct resource *res; + struct resource *res, *res2; res = platform_get_resource(pdev, IORESOURCE_MEM, 4); if (!res) @@ -1805,10 +1805,10 @@ vpfe_ipipe_init(struct vpfe_ipipe_device *ipipe, struct platform_device *pdev) if (!ipipe->base_addr) goto error_release; - res = platform_get_resource(pdev, IORESOURCE_MEM, 6); - if (!res) + res2 = platform_get_resource(pdev, IORESOURCE_MEM, 6); + if (!res2) goto error_unmap; - ipipe->isp5_base_addr = ioremap_nocache(res->start, res_len); + ipipe->isp5_base_addr = ioremap_nocache(res2->start, res_len); if (!ipipe->isp5_base_addr) goto error_unmap; -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines
On Wed, 2017-08-16 at 10:31 +0300, Dan Carpenter wrote: > On Wed, Aug 16, 2017 at 10:53:18AM +0530, Rishabh Hardas wrote: > > @@ -143,10 +142,13 @@ struct pi433_rx_cfg { > > > > #define PI433_IOC_MAGIC'r' > > > > -#define PI433_IOC_RD_TX_CFG_IOR(PI433_IOC_MAGIC, > > PI433_TX_CFG_IOCTL_NR, char[sizeof(struct pi433_tx_cfg)]) > > -#define PI433_IOC_WR_TX_CFG_IOW(PI433_IOC_MAGIC, > > PI433_TX_CFG_IOCTL_NR, char[sizeof(struct pi433_tx_cfg)]) > > - > > -#define PI433_IOC_RD_RX_CFG_IOR(PI433_IOC_MAGIC, > > PI433_RX_CFG_IOCTL_NR, char[sizeof(struct pi433_rx_cfg)]) > > -#define PI433_IOC_WR_RX_CFG_IOW(PI433_IOC_MAGIC, > > PI433_RX_CFG_IOCTL_NR, char[sizeof(struct pi433_rx_cfg)]) > > +#define PI433_IOC_RD_TX_CFG_IOR(PI433_IOC_MAGIC, > > PI433_TX_CFG_IOCTL_NR,\ > > +char[sizeof(struct pi433_tx_cfg)]) > > +#define PI433_IOC_WR_TX_CFG_IOW(PI433_IOC_MAGIC, > > PI433_TX_CFG_IOCTL_NR,\ > > +char[sizeof(struct pi433_tx_cfg)]) > > +#define PI433_IOC_RD_RX_CFG_IOR(PI433_IOC_MAGIC, > > PI433_RX_CFG_IOCTL_NR,\ > > +char[sizeof(struct pi433_rx_cfg)]) > > +#define PI433_IOC_WR_RX_CFG_IOW(PI433_IOC_MAGIC, > > PI433_RX_CFG_IOCTL_NR,\ > > +char[sizeof(struct pi433_rx_cfg)]) > > > These don't help readability. The original was better. The original wasn't any good either. It'd be better to avoid the macros altogether as almost all are use-once. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 01/15] EDAC: make device_type const
On Sat, Aug 19, 2017 at 01:52:12PM +0530, Bhumika Goyal wrote: > Make these const as they are only stored in the type field of a device > structure, which is const. > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal> --- > drivers/edac/edac_mc_sysfs.c | 8 > drivers/edac/i7core_edac.c | 4 ++-- > 2 files changed, 6 insertions(+), 6 deletions(-) Applied, thanks. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel