All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Russell King <linux@armlinux.org.uk>,
	Adrian Salido <salidoa@google.com>,
	Nicolai Stange <nstange@suse.de>,
	Sasha Levin <Alexander.Levin@microsoft.com>,
	Todd Kjos <tkjos@android.com>,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2 1/4] ARM: amba: Make driver_override output consistent with other buses
Date: Tue, 10 Apr 2018 15:21:43 +0200	[thread overview]
Message-ID: <1523366506-19832-2-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1523366506-19832-1-git-send-email-geert+renesas@glider.be>

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@glider.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

  reply	other threads:[~2018-04-10 13:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 13:21 [PATCH v2 0/4] ARM: amba: driver_override improvements and fixes Geert Uytterhoeven
2018-04-10 13:21 ` Geert Uytterhoeven [this message]
2018-04-25 15:53   ` [PATCH v2 1/4] ARM: amba: Make driver_override output consistent with other buses Todd Kjos
2018-04-10 13:21 ` [PATCH v2 2/4] ARM: amba: Fix race condition with driver_override Geert Uytterhoeven
2018-04-25 15:56   ` Todd Kjos
2018-04-25 16:06   ` Greg Kroah-Hartman
2018-04-25 17:53     ` Geert Uytterhoeven
2018-04-26  7:04       ` Greg Kroah-Hartman
2018-04-26  7:40         ` Geert Uytterhoeven
2018-04-26  8:35           ` Greg Kroah-Hartman
2018-04-26  8:45             ` Geert Uytterhoeven
2018-05-09 10:39               ` Russell King - ARM Linux
2018-05-09 13:32                 ` Geert Uytterhoeven
2018-05-09 14:50                   ` Greg Kroah-Hartman
2018-04-10 13:21 ` [PATCH v2 3/4] ARM: amba: Don't read past the end of sysfs "driver_override" buffer Geert Uytterhoeven
2018-04-25 15:56   ` Todd Kjos
2018-04-10 13:21 ` [PATCH v2 4/4] ARM: amba: Fix wrong indentation in driver_override_store() Geert Uytterhoeven
2018-04-25 15:58   ` Todd Kjos
2018-04-10 22:19 ` [PATCH v2 0/4] ARM: amba: driver_override improvements and fixes Russell King - ARM Linux
2018-04-25 16:08   ` Greg Kroah-Hartman
2018-04-25 17:27   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1523366506-19832-2-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=Alexander.Levin@microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nstange@suse.de \
    --cc=salidoa@google.com \
    --cc=tkjos@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.