From: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
To: Quan Nguyen <quan@os.amperecomputing.com>,
Corey Minyard <minyard@acm.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Joel Stanley <joel@jms.id.au>, "Andrew Jeffery" <andrew@aj.id.au>,
Brendan Higgins <brendanhiggins@google.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Wolfram Sang <wsa@kernel.org>,
<openipmi-developer@lists.sourceforge.net>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
<linux-i2c@vger.kernel.org>, <openbmc@lists.ozlabs.org>
Cc: Open Source Submission <patches@amperecomputing.com>,
"Thang Q . Nguyen" <thang@os.amperecomputing.com>,
Phong Vo <phong@os.amperecomputing.com>
Subject: Re: [PATCH v6 1/4] ipmi: ssif_bmc: Add SSIF BMC driver
Date: Mon, 14 Mar 2022 11:15:52 -0700 [thread overview]
Message-ID: <7cd9301f-f417-e555-6025-74acfc53598a@quicinc.com> (raw)
In-Reply-To: <20220310114119.13736-2-quan@os.amperecomputing.com>
Hi Quan,
[...]
> +static void on_read_requested_event(struct ssif_bmc_ctx *ssif_bmc, u8 *val)
> +{
> + if (ssif_bmc->state == SSIF_READY ||
> + ssif_bmc->state == SSIF_START ||
> + ssif_bmc->state == SSIF_REQ_RECVING ||
> + ssif_bmc->state == SSIF_RES_SENDING) {
> + ssif_bmc->state = SSIF_BAD_SMBUS;
> + dev_warn(&ssif_bmc->client->dev,
> + "Warn: %s unexpected READ REQUESTED in state=%s\n",
> + __func__, state_to_string(ssif_bmc->state));
It will print out that the case happens in SSIF_BAD_SMBUS state always
because ssif_bmc->state is already assigned as SSIF_BAD_SMBUS above.
Move the assignment to after the dev_warn printing.
[...]
> +static const struct of_device_id ssif_bmc_match[] = {
> + { .compatible = "ampere,ssif-bmc" },
Does this driver have any Ampere specific handling? If not, it could be
"ssif-bmc" as a generic SSIF driver.
> + { },
> +};
Add 'MODULE_DEVICE_TABLE(of, ssif_bmc_match);'
> +
> +static const struct i2c_device_id ssif_bmc_id[] = {
> + { DEVICE_NAME, 0 },
> + { },
> +};
> +
Remove this blank line.
> +MODULE_DEVICE_TABLE(i2c, ssif_bmc_id);
> +
> +static struct i2c_driver ssif_bmc_driver = {
> + .driver = {
> + .name = DEVICE_NAME,
> + .of_match_table = ssif_bmc_match,
> + },
> + .probe = ssif_bmc_probe,
> + .remove = ssif_bmc_remove,
> + .id_table = ssif_bmc_id,
> +};
> +
Remove this blank line too.
-Jae
> +module_i2c_driver(ssif_bmc_driver);
> +
> +MODULE_AUTHOR("Quan Nguyen <quan@os.amperecomputing.com>");
> +MODULE_AUTHOR("Chuong Tran <chuong@os.amperecomputing.com>");
> +MODULE_DESCRIPTION("Linux device driver of the BMC IPMI SSIF interface.");
> +MODULE_LICENSE("GPL");
[...]
next prev parent reply other threads:[~2022-03-14 18:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 11:41 [PATCH v6 0/4] " Quan Nguyen
2022-03-10 11:41 ` [PATCH v6 1/4] ipmi: ssif_bmc: " Quan Nguyen
2022-03-11 1:19 ` Corey Minyard
2022-03-17 8:30 ` Quan Nguyen
2022-03-17 13:13 ` Corey Minyard
2022-04-08 4:40 ` Quan Nguyen
2022-03-11 6:20 ` kernel test robot
2022-03-14 18:15 ` Jae Hyun Yoo [this message]
2022-03-17 9:00 ` Quan Nguyen
2022-03-10 11:41 ` [PATCH v6 2/4] bindings: ipmi: Add binding for " Quan Nguyen
2022-03-10 11:41 ` [PATCH v6 3/4] ipmi: ssif_bmc: Return -EFAULT if copy_from_user() fails Quan Nguyen
2022-03-11 6:58 ` Wolfram Sang
2022-03-17 7:45 ` Quan Nguyen
2022-03-17 8:38 ` Dan Carpenter
2022-03-10 11:41 ` [PATCH v6 4/4] i2c: aspeed: Assert NAK when slave is busy Quan Nguyen
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=7cd9301f-f417-e555-6025-74acfc53598a@quicinc.com \
--to=quic_jaehyoo@quicinc.com \
--cc=andrew@aj.id.au \
--cc=benh@kernel.crashing.org \
--cc=brendanhiggins@google.com \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openbmc@lists.ozlabs.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=patches@amperecomputing.com \
--cc=phong@os.amperecomputing.com \
--cc=quan@os.amperecomputing.com \
--cc=robh+dt@kernel.org \
--cc=thang@os.amperecomputing.com \
--cc=wsa@kernel.org \
/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
all inboxes | Powered by JetHome®