[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD0t5oN8M4yj1=9cbZQ6NUC8paHMYyTcQ7yL9oAP4AvFD22nTw@mail.gmail.com>
Date: Wed, 25 Apr 2018 08:53:37 -0700
From: Todd Kjos <tkjos@...roid.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Russell King <linux@...linux.org.uk>,
Adrian Salido <salidoa@...gle.com>,
Nicolai Stange <nstange@...e.de>,
Sasha Levin <Alexander.Levin@...rosoft.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/4] ARM: amba: Make driver_override output consistent
with other buses
Reviewed-by: Todd Kjos <tkjos@...gle.com>
On Tue, Apr 10, 2018 at 6:21 AM, Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
> For AMBA devices with unconfigured driver override, the
> "driver_override" sysfs virtual file is empty, while it contains
> "(null)" for platform and PCI devices.
>
> Make AMBA consistent with other buses by dropping the test for a NULL
> pointer.
>
> Note that contrary to popular belief, sprintf() handles NULL pointers
> fine; they are printed as "(null)".
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> drivers/amba/bus.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
> index 594c228d2f021123..6ffd778352e6d953 100644
> --- a/drivers/amba/bus.c
> +++ b/drivers/amba/bus.c
> @@ -70,9 +70,6 @@ static ssize_t driver_override_show(struct device *_dev,
> {
> struct amba_device *dev = to_amba_device(_dev);
>
> - if (!dev->driver_override)
> - return 0;
> -
> return sprintf(buf, "%s\n", dev->driver_override);
> }
>
> --
> 2.7.4
>
Powered by blists - more mailing lists