linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kamlakant Patel <kamlakantp@marvell.com>
To: Corey Minyard <minyard@acm.org>
Cc: Kamlakant Patel <kamlakantp@marvell.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"openipmi-developer@lists.sourceforge.net" 
	<openipmi-developer@lists.sourceforge.net>
Subject: [PATCH] ipmi: fix slave-addr property add to ipmi platform device
Date: Wed, 24 Apr 2019 10:34:14 +0000	[thread overview]
Message-ID: <1556102007-14083-1-git-send-email-kamlakantp@marvell.com> (raw)

Remove check for p->slave_addr while adding 'slave-addr' property entry
since it can be 0.
Currently, it throws following error:
"ipmi_ssif dmi-ipmi-ssif.0: ipmi_ssif: device has no slave-addr
property"

This patch fixes the issue.

Signed-off-by: Kamlakant Patel <kamlakantp@marvell.com>
---
 drivers/char/ipmi/ipmi_plat_data.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_plat_data.c b/drivers/char/ipmi/ipmi_plat_data.c
index 8f0ca2a..2b62104 100644
--- a/drivers/char/ipmi/ipmi_plat_data.c
+++ b/drivers/char/ipmi/ipmi_plat_data.c
@@ -34,8 +34,7 @@ struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
 		p->regspacing = p->regsize;
 
 	pr[pidx++] = PROPERTY_ENTRY_U8("ipmi-type", p->type);
-	if (p->slave_addr)
-		pr[pidx++] = PROPERTY_ENTRY_U8("slave-addr", p->slave_addr);
+	pr[pidx++] = PROPERTY_ENTRY_U8("slave-addr", p->slave_addr);
 	pr[pidx++] = PROPERTY_ENTRY_U8("addr-source", p->addr_source);
 	if (p->regshift)
 		pr[pidx++] = PROPERTY_ENTRY_U8("reg-shift", p->regshift);
-- 
1.8.3.1


             reply	other threads:[~2019-04-24 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 10:34 Kamlakant Patel [this message]
2019-04-24 13:27 ` [PATCH] ipmi: fix slave-addr property add to ipmi platform device Corey Minyard

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=1556102007-14083-1-git-send-email-kamlakantp@marvell.com \
    --to=kamlakantp@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).