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
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
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
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
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
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
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
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
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
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
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
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 ++-
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
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
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
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
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
(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
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
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:
&
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...
done for working
driver.
--
With Best Regards,
Andy Shevchenko
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
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
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
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.
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
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
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
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] [
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
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
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
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
_
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
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
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
> +
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
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
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
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
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
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
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 ':
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
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...
> + }
..
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
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
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
- 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
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
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,
>
> + }
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
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
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
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
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
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
)
> 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
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
301 - 359 of 359 matches
Mail list logo