[PATCH v3 06/11] wireless: ipw2x00: print SSID via %*pE

2014-08-20 Thread Andy Shevchenko
Instead of custom approach this allows to print escaped strings via recently added kernel extension: %*pE. Signed-off-by: Andy Shevchenko --- drivers/net/wireless/ipw2x00/ipw2100.c | 22 +-- drivers/net/wireless/ipw2x00/ipw2200.c | 270 ++- drivers/net/wireless

Re: [PATCH v3 04/11] lib/vsprintf: add %*pE[achnops] format specifier

2014-08-25 Thread Andy Shevchenko
On Wed, 2014-08-20 at 07:46 -0700, Joe Perches wrote: > On Wed, 2014-08-20 at 12:42 +0300, Andy Shevchenko wrote: > > This allows user to print a given buffer as an escaped string. The rules are > > applied according to an optional mix of flags provided by additional for

[PATCH v1 1/4] lib/net_utils: Relax NULL-termination requirement on input string

2017-12-19 Thread Andy Shevchenko
We have not been caring about garbage at the end of input string and this change doesn't affect it. What we prevent here is possibility to go over boundaries when input string is not NULL terminated at all. Allow mac_pton() work on non-NULL terminated strings. Signed-off-by: Andy Shevc

[PATCH v1 4/4] staging: rtl8712: Replace mac address parsing

2017-12-19 Thread Andy Shevchenko
Replace copy_from_user() + mac_pton() with mac_pton_from_user(). Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers

[PATCH v1 3/4] staging: rtl8723bs: Replace mac address parsing

2017-12-19 Thread Andy Shevchenko
Replace copy_from_user() + sscanf() with mac_pton_from_user(). While here, replace memcpy(..., ETH_ALEN) with ether_addr_copy(). Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8723bs/core/rtw_debug.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a

[PATCH v1 2/4] lib/net_utils: Introduce mac_pton_from_user()

2017-12-19 Thread Andy Shevchenko
Some drivers are getting MAC from user space. Make a helper for them. Signed-off-by: Andy Shevchenko --- include/linux/kernel.h | 1 + lib/net_utils.c| 12 2 files changed, 13 insertions(+) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ce51455e2adf

[PATCH v1 02/10] staging: atomisp: Remove duplicate NULL-check

2017-12-19 Thread Andy Shevchenko
GPIO framework checks for NULL pointer when gpiod_set_value() is called. Signed-off-by: Andy Shevchenko --- .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/platform/intel

[PATCH v1 03/10] staging: atomisp: lm3554: Fix control values

2017-12-19 Thread Andy Shevchenko
Driver fails to initialize due to insane settings in the control init array. Fix this by moving to sanity. Signed-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media

[PATCH v1 06/10] staging: atomisp: Switch to use struct device_driver directly

2017-12-19 Thread Andy Shevchenko
In a preparation of split PCI glue driver from core part, convert the driver to use more generic struct device_driver. Signed-off-by: Andy Shevchenko --- .../staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 17 - .../staging/media/atomisp/pci/atomisp2/atomisp_drvfs.h | 5

[PATCH v1 05/10] staging: atomisp: Remove non-ACPI leftovers

2017-12-19 Thread Andy Shevchenko
Since all drivers are solely requiring ACPI enumeration, there is no need to additionally check for legacy platform data or ACPI handle. Remove leftovers from the sensors and platform code. Signed-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 10

[PATCH v1 10/10] staging: atomisp: Fix DMI matching entry for MRD7

2017-12-19 Thread Andy Shevchenko
MRD7 board has in particular Base Board Information Manufacturer: Intel Corp. Product Name: TABLET Version: MRD 7 Fix the DMI matching entry for it. Signed-off-by: Andy Shevchenko --- .../staging/media/atomisp/platform/intel-mid

[PATCH v1 08/10] staging: atomisp: Unexport local function

2017-12-19 Thread Andy Shevchenko
There is no need to export function which is only used once in the same module where it's defined. Signed-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h | 1 - .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 5 ++-

[PATCH v1 04/10] staging: atomisp: Disable custom format for now

2017-12-19 Thread Andy Shevchenko
ned-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/include/linux/atomisp.h | 2 ++ drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 5 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH v1 09/10] staging: atomisp: Use standard DMI match table

2017-12-19 Thread Andy Shevchenko
The traditional pattern is to use DMI matching table and provide a corresponding driver_data in it. Convert driver to use DMI matching table. Signed-off-by: Andy Shevchenko --- .../platform/intel-mid/atomisp_gmin_platform.c | 109 + 1 file changed, 70 insertions(+), 39

[PATCH v1 07/10] staging: atomisp: Remove redundant PCI code

2017-12-19 Thread Andy Shevchenko
There is no need to keep a reference to PCI root bridge. Signed-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 2 files changed, 9 deletions(-) diff --git a/drivers

[PATCH v1 01/10] staging: atomisp: Don't leak GPIO resources if clk_get() failed

2017-12-19 Thread Andy Shevchenko
In case devm_clk_get() call fails the previously requested GPIOs are left requested. Fix this by moving GPIO request code after devm_clk_get() call. Signed-off-by: Andy Shevchenko --- .../staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 4 ++-- 1 file changed, 2 insertions

Re: [PATCH v1 05/10] staging: atomisp: Remove non-ACPI leftovers

2017-12-20 Thread Andy Shevchenko
On Wed, Dec 20, 2017 at 6:54 AM, Dan Carpenter wrote: > On Tue, Dec 19, 2017 at 10:59:52PM +0200, Andy Shevchenko wrote: >> @@ -1147,10 +1145,8 @@ static int gc2235_probe(struct i2c_client *client) >> if (ret) >> gc2235_remove(client); > > This error

Re: [PATCH] Staging: iio: Prefer using BIT macro

2018-01-07 Thread Andy Shevchenko
(1 << 6) >> +#define AD7152_SETUP_RANGE_0_5pF BIT(6) > This is clearly putting the value 1 in a 2 bit field within > the register - BIT macro obscures this compeltely. -- With Best Regards, Andy Shevchenko ___ devel mailing list de

Re: [PATCH] staging: media: remove unused VIDEO_ATOMISP_OV8858 kconfig

2018-01-23 Thread Andy Shevchenko
ardware to test? This is *most* important reason why to accept or decline a change to the driver. -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: media: remove unused VIDEO_ATOMISP_OV8858 kconfig

2018-01-26 Thread Andy Shevchenko
On Fri, Jan 26, 2018 at 2:49 PM, LABBE Corentin wrote: > On Tue, Jan 23, 2018 at 07:20:12PM +0100, Greg Kroah-Hartman wrote: >> On Tue, Jan 23, 2018 at 07:31:27PM +0200, Andy Shevchenko wrote: >> > On Tue, Jan 23, 2018 at 4:37 PM, Corentin Labbe >> > wrote: &

Re: [PATCH v2] staging: media: remove remains of VIDEO_ATOMISP_OV8858

2018-01-29 Thread Andy Shevchenko
emove the OV8858 kconfig and files. Fine with me. We can sort things out later (repository will have the sources still in any case) when the driver itself shows signs of life. -- Andy Shevchenko Intel Finland Oy ___ devel mailing list de...

Re: [PATCH] staging: media: atomisp2: remove unused headers

2018-01-29 Thread Andy Shevchenko
done for working driver. -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/2] staging: rts5208: rename SG_END macro

2018-03-01 Thread Andy Shevchenko
rs/staging/rts5208/rtsx_chip.h:343: error: "SG_END" redefined [-Werror] > > This changes one instance of the driver to prefix SG_END and > related constants. > Thanks, Arnd. This is right thing to do by my opinion. Reviewed-by: Andy Shevchenko > Fixes: 723fbf563a6a

Re: [PATCH v2] staging: bcm2835-audio: Release resources on module_exit()

2018-03-13 Thread Andy Shevchenko
u call device_register() inside snd_device_new()? In this case you might need put_device() here instead of simple kfree(). > return err; > } -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Andy Shevchenko
On Thu, Mar 15, 2018 at 7:57 AM, Kirill Marinushkin wrote: > On 03/13/18 22:23, Andy Shevchenko wrote: >> On Tue, Mar 13, 2018 at 9:34 PM, Kirill Marinushkin >> wrote: >>> In the current implementation, `rmmod snd_bcm2835` does not release >>> resources properly.

Re: [PATCH v3] staging: bcm2835-audio: Release resources on module_exit()

2018-03-21 Thread Andy Shevchenko
tatic int snd_add_child_device(struct device *device, > return err; > } > > - dev_set_drvdata(child, card); > + dev_set_drvdata(child, chip); > dev_info(child, "card created with %d channels\n", numchans); > > return 0; > @@ -414,6 +410,12 @@ static int snd_bcm2835_alsa_probe_dt(struct > platform_device *pdev) > return 0; > } > > +static int snd_bcm2835_alsa_remove(struct platform_device *pdev) > +{ > + /* trigger snd_devm_unregister_child() */ > + return 0; > +} > + > #ifdef CONFIG_PM > > static int snd_bcm2835_alsa_suspend(struct platform_device *pdev, > @@ -437,6 +439,7 @@ MODULE_DEVICE_TABLE(of, snd_bcm2835_of_match_table); > > static struct platform_driver bcm2835_alsa0_driver = { > .probe = snd_bcm2835_alsa_probe_dt, > + .remove = snd_bcm2835_alsa_remove, > #ifdef CONFIG_PM > .suspend = snd_bcm2835_alsa_suspend, > .resume = snd_bcm2835_alsa_resume, > -- > 2.13.6 > -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4] staging: bcm2835-audio: Release resources on module_exit()

2018-03-23 Thread Andy Shevchenko
if (ret) > return ERR_PTR(ret); > > return card; > } Same here. You removed anything related to devm here, so, please make function name consistent. After addressing above, FWIW, Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko

Re: [PATCH v4] staging: bcm2835-audio: Release resources on module_exit()

2018-03-25 Thread Andy Shevchenko
On Fri, Mar 23, 2018 at 9:22 PM, Kirill Marinushkin wrote: > On 03/23/18 17:23, Andy Shevchenko wrote: >> After addressing above, FWIW, >> >> Reviewed-by: Andy Shevchenko Seems you missed my tag in new version. When someone gives you a tag and you are going to send a new

Re: [PATCH v5] staging: bcm2835-audio: Release resources on module_exit()

2018-03-25 Thread Andy Shevchenko
s_open) from [<802d9a68>] > (path_openat+0x368/0x944) > [ 139.248270] [<802d9a68>] (path_openat) from [<802dacd4>] > (do_filp_open+0x70/0xc4) > [ 139.263731] [<802dacd4>] (do_filp_open) from [<802c6f70>] > (do_sys_open+0x110/0x1d4) > [ 139.279378] [

Re: [PATCH v4] staging: bcm2835-audio: Release resources on module_exit()

2018-03-25 Thread Andy Shevchenko
On Sun, Mar 25, 2018 at 1:44 PM, Kirill Marinushkin wrote: > On 03/25/18 12:33, Andy Shevchenko wrote: >> On Fri, Mar 23, 2018 at 9:22 PM, Kirill Marinushkin >> wrote: >>> On 03/23/18 17:23, Andy Shevchenko wrote: >>>> After addressing above, FWIW, &g

Re: [PATCH 07/18] media: staging: atomisp: fix endianess issues

2018-03-27 Thread Andy Shevchenko
2 *wdata = (void *)&data[2]; > + > + *wdata = be32_to_cpu(*(__be32 *)&data[2]); For x86 it is okay, though in general it should use get_unaligned(). -- Andy Shevchenko Intel Finland Oy ___ devel mailing list de...@linuxdriverproject.o

Re: [PATCH] media: ipu3: add a module to probe sensors via ACPI

2020-05-21 Thread Andy Shevchenko
for swnodes. With that done it will be feasible to achieve the rest. I forgot if we have anything for this already done. Heikki? -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject

Re: [PATCH 5/5] iio: remove left-over parent assignments

2020-05-22 Thread Andy Shevchenko
trig | grep -vq devm_; then > echo "$file -> $(grep "parent =" $file)" > fi > done > --- Side note: time to learn coccinelle or shell better :-) -- With Best Regards, Andy Shevchenko _

Re: [PATCH 1/5] iio: core: pass parent device as parameter during allocation

2020-05-22 Thread Andy Shevchenko
this patch, only the 'drivers/platform/x86/toshiba_acpi.c' needs an > update to pass the parent object as a parameter. Acked-by: Andy Shevchenko > > In the next patch all devm_iio_device_alloc() calls will be handled. > > Signed-off-by: Alexandru Ardelean > --- > drive

Re: [PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-04 Thread Andy Shevchenko
in the kernel. For example, above line is like pfn = PFN_DOWN(phys); ... > > > + if (!WARN_ON(!dev) && dev->dma_pfn_offset_map) > > > + *dma_handle -= PFN_PHYS( > > > + dma_pfn_offset_from_phys_addr(dev, phys

Re: [PATCH v4 08/12] device core: Introduce multiple dma pfn offsets

2020-06-07 Thread Andy Shevchenko
u_addr) > + - PFN_DOWN(range.bus_addr); Ditto (indentation). ... > + unsigned long dma_pfn_offset > + = dma_pfn_offset_from_phys_addr(dev, paddr); Ditto. ... > + unsigned long dma_pfn_offset > +

Re: [PATCH v4 08/12] device core: Introduce multiple dma pfn offsets

2020-06-09 Thread Andy Shevchenko
On Mon, Jun 08, 2020 at 11:48:51AM -0400, Jim Quinlan wrote: > On Sun, Jun 7, 2020 at 12:500f9bfe0fb8840b268af1bbcc51f1cd440514e PM > Andy Shevchenko wrote: > > On Fri, Jun 05, 2020 at 05:26:48PM -0400, Jim Quinlan wrote: ... > > > + *map_size = (num_range

Re: [PATCH 0/7] Some atomisp fixes and improvements

2020-06-26 Thread Andy Shevchenko
267 insertions(+), 128 deletions(-) > > -- > 2.26.2 > > -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 0/7] Some atomisp fixes and improvements

2020-06-29 Thread Andy Shevchenko
On Fri, Jun 26, 2020 at 05:52:16PM +0200, Mauro Carvalho Chehab wrote: > Em Fri, 26 Jun 2020 18:00:21 +0300 > Andy Shevchenko escreveu: > > > On Fri, Jun 26, 2020 at 04:04:52PM +0200, Mauro Carvalho Chehab wrote: > > > Those patches are meant to improve device detecti

Re: [PATCH v6 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-02 Thread Andy Shevchenko
ap) : 0; PTR_ERR_OR_ZERO() ... > + = dma_offset_from_phys_addr(dev, > PFN_PHYS(mem->pfn_base)); > + > + return (dma_addr_t)PFN_PHYS(mem->pfn_base) - dma_offset; Looking at this more, I think you need to introduce in the same header (pfn.h) som

Re: [PATCH] Staging : media : atomisp : pci : fixed a brace coding sytle issue

2020-07-27 Thread Andy Shevchenko
On Mon, Jul 27, 2020 at 01:31:50PM +0530, Ankit wrote: > From: Ankit Baluni > > Fixed a coding style issue. One time is enough to be sent :-) The Subject nevertheless can be amended, like media: atomisp: fixed a brace coding sytle issue -- With Best Regards, Andy S

Re: [PATCH] Staging : iio : Fixed a punctuation and a spelling mistake.

2020-07-29 Thread Andy Shevchenko
On Wed, Jul 29, 2020 at 3:34 AM Ankit Baluni wrote: > > Added a missing comma and changed 'it it useful' to 'it is useful'. Please, drop spaces before : in the subject line. In all patches you submitted there is such an issue. -- With Bes

Re: [PATCH -v2] Staging: iio: Fixed a punctuation and a spelling mistake.

2020-07-29 Thread Andy Shevchenko
On Wed, Jul 29, 2020 at 11:12 AM Ankit Baluni wrote: > > Added a missing comma and changed 'it it useful' to 'it is useful'. Reviewed-by: Andy Shevchenko > Signed-off-by: Ankit Baluni > --- > Changes in -v2: > -Remove space before ':

Re: [PATCH v3] Staging: media: atomisp: fixed a brace coding sytle issue

2020-07-29 Thread Andy Shevchenko
On Wed, Jul 29, 2020 at 01:19:50PM +0530, Ankit Baluni wrote: > Removed braces for a 'if' condition as it contain only single line & > there is no need for braces for such case according to coding style > rules. Reviewed-by: Andy Shevchenko > Signed-off-by: Ankit Bal

Re: [PATCH] staging: atomisp: move null check to earlier point

2020-07-29 Thread Andy Shevchenko
static int gmin_v2p8_ctrl(struct v4l2_subdev *subdev, > int on) > int ret; > int value; > > + if (!gs) { > + pr_err("Unable to find gmin subdevice\n"); > + return -EINVAL; And here is a change of semantics... > + } ..

[PATCH v1] staging: most: Use %pM format specifier for MAC addresses

2020-07-30 Thread Andy Shevchenko
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko --- drivers/staging/most/net/net.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c index 830f089f1a88..b6fecb06a0e6 100644 --- a

[PATCH v1] staging: ks7010: Use %pM format specifier for MAC addresses

2020-07-30 Thread Andy Shevchenko
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko --- drivers/staging/ks7010/ks_hostif.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index d70b671b06aa

[PATCH v1] staging: fieldbus: Use %pM format specifier for MAC addresses

2020-07-30 Thread Andy Shevchenko
Convert to %pM instead of using custom code. While here, replace one time use structure by buffer on stack. Signed-off-by: Andy Shevchenko --- drivers/staging/fieldbus/anybuss/hms-profinet.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging

Re: [PATCH v2] staging: atomisp: move null check to earlier point

2020-07-31 Thread Andy Shevchenko
- return -EINVAL if unknown PMIC type. This has to go after cutter '---' line below. > Caught-by: Coverity Static Analyzer CID 1465536 Reported-by: And as discussed previously, Suggested-by: Mauro ... > Signed-off-by: Cengiz Can

Re: [PATCH RESEND v10 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-18 Thread Andy Shevchenko
ap) > +{ > + int num_ranges; > + struct bus_dma_region *new_map; > + const struct bus_dma_region *r = map; > + > + for (num_ranges = 0; r->size; num_ranges++) > + r++; > + new_map = kcalloc(num_ranges + 1, sizeof(*map), GFP_KERNEL); > + if (new_map) > + memcpy(new_map, map, sizeof(*map) * num_ranges); Looks like krealloc() on the first glance... > + > + return new_map; > +} -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH RESEND v10 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-21 Thread Andy Shevchenko
On Thu, Aug 20, 2020 at 09:37:12AM -0400, Jim Quinlan wrote: > On Tue, Aug 18, 2020 at 4:14 AM Andy Shevchenko > wrote: > > On Mon, Aug 17, 2020 at 05:53:09PM -0400, Jim Quinlan wrote: ... > > > +static inline u64 dma_offset_from_dma_addr(struct device *dev, >

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-25 Thread Andy Shevchenko
> + } Wouldn't be better to do an assignment of offset here? > + if (!offset) > + return 0; > + > + map = kcalloc(2, sizeof(*map), GFP_KERNEL); > + if (!map) > + return -ENOMEM; > + map[0].cpu_start = cpu_start; > + map

[PATCH] staging: lustre: re-use kbasename() common helper

2013-08-12 Thread Andy Shevchenko
To get the name of a file from a pathname we may use kbasename() helper. Signed-off-by: Andy Shevchenko --- drivers/staging/lustre/lustre/libcfs/tracefile.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers

[PATCH] staging: silicom: introduce bp_dev_get_idx_bsf() and use it

2013-09-02 Thread Andy Shevchenko
There are two places where duplicate code is located. Moreover, there is a custom implementation of the sscanf() functionality. This patch makes code quite simplier and cleaner. Signed-off-by: Andy Shevchenko --- drivers/staging/silicom/bpctl_mod.c | 188 +--- 1

[PATCH] staging: silicom: introduce bp_dev_get_idx_bsf() and use it

2013-09-02 Thread Andy Shevchenko
There are two places where duplicate code is located. Moreover, there is a custom implementation of the sscanf() functionality. This patch makes code quite simplier and cleaner. Signed-off-by: Andy Shevchenko --- drivers/staging/silicom/bpctl_mod.c | 188 +--- 1

[PATCH, resend] staging: silicom: introduce bp_dev_get_idx_bsf() and use it

2013-09-13 Thread Andy Shevchenko
There are two places where duplicate code is located. Moreover, there is a custom implementation of the sscanf() functionality. This patch makes code quite simplier and cleaner. Signed-off-by: Andy Shevchenko --- drivers/staging/silicom/bpctl_mod.c | 188 +--- 1

[PATCH] staging: rtl8712: re-use native mac_pton() helper

2013-09-13 Thread Andy Shevchenko
There is a nice helper to parse MAC. Let's use it and remove custom implementation. Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8712/usb_intf.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/st

Re: [PATCH v1] pinctrl: ralink: rt2880: Check for return value of devm_kcalloc()

2022-03-29 Thread Andy Shevchenko
) > p->func[i]->pins[j] = p->func[i]->pin_first + j; -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: Re: [PATCH v1] pinctrl: ralink: rt2880: Check for return value of devm_kcalloc()

2022-04-01 Thread Andy Shevchenko
o not top-post! What you explained is logical from APIs point of view, what I was asking is about functional point of view. Why do you think the skipping iteration is fine? You need to explain this in the code/commit message. > At 2022-03-29 19:45:50, "Andy Shevchenko" wrote: &g

<    1   2   3   4