public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jan Dabros <jsd@semihalf.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	jarkko.nikula@linux.intel.com, wsa@kernel.org,
	rrangel@chromium.org, upstream@semihalf.com,
	mario.limonciello@amd.com
Subject: Re: [PATCH -next 2/2] i2c: designware: Add support for new SoCs in AMDPSP driver
Date: Mon, 19 Sep 2022 16:59:51 +0300	[thread overview]
Message-ID: <YySdjEXHqvTL8mEl@smile.fi.intel.com> (raw)
In-Reply-To: <20220916131854.687371-3-jsd@semihalf.com>

On Fri, Sep 16, 2022 at 03:18:54PM +0200, Jan Dabros wrote:
> New AMD SoCs are using different algorithm for x86-PSP communication,
> thus need to modify I2C arbitration driver. Since possible future
> revisions should have follow new approach, mark functions used only for
> Cezanne with "czn_" prefix.
> 
> While at it, remove redundant check by modifying psp_wait_cmd() to only
> check for MBOX_READY bit, since MBOX_CMD field being zero is verified by
> czn_psp_check_mbox_sts() later on in the sequence.

...

> -#define PSP_MBOX_CMD_OFFSET		0x3810570
> -#define PSP_MBOX_BUFFER_L_OFFSET	0x3810574
> -#define PSP_MBOX_BUFFER_H_OFFSET	0x3810578
> +#define CZN_PSP_MBOX_CMD_OFFSET		0x3810570
> +#define CZN_PSP_MBOX_BUFFER_L_OFFSET	0x3810574
> +#define CZN_PSP_MBOX_BUFFER_H_OFFSET	0x3810578

Can we avoid this renaming noise by putting the proper names in the first place
(in the first patch)? Respectively move the corresponding commit message piece
to there.

Or looking into the below maybe even split the renaming to a separate
non-functional change?

...

> +	if (req)
> +		ret = czn_psp_send_cmd(req);
> +	else
> +		ret = psp_send_cmd(i2c_req_type);

> +

Unnecessary blank line.

> +	if (ret)
>  		return -EIO;

Why you can't return the actual error code here?

...

>  	start = jiffies;
>  	ret = read_poll_timeout(psp_send_check_i2c_req, status,
>  				(status != -EBUSY),
>  				PSP_I2C_REQ_RETRY_DELAY_US,
>  				PSP_I2C_REQ_RETRY_CNT * PSP_I2C_REQ_RETRY_DELAY_US,
> -				0, req);
> +				0, req, i2c_req_type);

> +

Stray blank line addition.

>  	if (ret) {
>  		dev_err(psp_i2c_dev, "Timed out waiting for PSP to %s I2C bus\n",
>  			(i2c_req_type == PSP_I2C_REQ_ACQUIRE) ?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-09-19 14:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 13:18 [PATCH -next 0/2] Add i2c arbitration support for new SoCs Jan Dabros
2022-09-16 13:18 ` [PATCH -next 1/2] i2c: designware: Switch from using MMIO access to SMN access Jan Dabros
2022-09-16 17:38   ` Limonciello, Mario
2022-09-20 16:24     ` Jan Dąbroś
2022-09-21 20:12       ` Borislav Petkov
2022-09-21 20:19         ` Limonciello, Mario
2022-09-21 20:50           ` Borislav Petkov
2022-09-22  9:49             ` Andy Shevchenko
2022-09-22  9:51               ` Andy Shevchenko
2022-09-22 13:48                 ` Hans de Goede
2022-09-22 14:04                   ` Borislav Petkov
2022-09-22 14:29                     ` Hans de Goede
2022-09-26 12:49                       ` Jan Dąbroś
2022-09-26 14:44                         ` Borislav Petkov
2022-10-28  8:32                           ` Jan Dąbroś
2023-01-09 11:12                             ` Borislav Petkov
2023-01-09 17:10                               ` Limonciello, Mario
2023-01-16 10:19                               ` Jan Dąbroś
2023-01-16 12:38                                 ` Andy Shevchenko
2023-01-16 16:22                                   ` Limonciello, Mario
2023-01-16 17:48                                     ` Andy Shevchenko
2023-01-16 17:54                                       ` Andy Shevchenko
2023-01-16 21:59                                 ` Borislav Petkov
2022-09-19 13:59   ` Andy Shevchenko
2022-09-20 16:27     ` Jan Dąbroś
2022-09-16 13:18 ` [PATCH -next 2/2] i2c: designware: Add support for new SoCs in AMDPSP driver Jan Dabros
2022-09-19 13:59   ` Andy Shevchenko [this message]
2023-03-17 19:18   ` Mark Hasemeyer
2023-03-20  0:16     ` Mario Limonciello
2022-09-19 13:59 ` [PATCH -next 0/2] Add i2c arbitration support for new SoCs Andy Shevchenko

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=YySdjEXHqvTL8mEl@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=rrangel@chromium.org \
    --cc=upstream@semihalf.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