public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Cc: "Andy Shevchenko" <andy@kernel.org>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Ferry Toth" <fntoth@gmail.com>
Subject: [PATCH v3 1/5] platform/x86: intel_scu_ipc: Unify the flow in pwr_reg_rdwr()
Date: Mon, 21 Oct 2024 16:34:29 +0300	[thread overview]
Message-ID: <20241021133705.2933464-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20241021133705.2933464-1-andriy.shevchenko@linux.intel.com>

Unify the flow in pwr_reg_rdwr() with intel_scu_ipc_dev_command_with_size().
While read buffer is not currently being used by the callers of
pwr_reg_rdwr(), this might change in the future. For the existing code
it's a harmless change because the read data for the write operation
is simply discarded.

Tested-by: Ferry Toth <fntoth@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/platform/x86/intel_scu_ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index 5b16d29c93d7..8d11d18701a4 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -325,7 +325,7 @@ static int pwr_reg_rdwr(struct intel_scu_ipc_dev *scu, u16 *addr, u8 *data,
 	}
 
 	err = intel_scu_ipc_check_status(scu);
-	if (!err && id == IPC_CMD_PCNTRL_R) { /* Read rbuf */
+	if (!err) { /* Read rbuf */
 		/* Workaround: values are read as 0 without memcpy_fromio */
 		memcpy_fromio(cbuf, scu->ipc_base + 0x90, 16);
 		for (nc = 0; nc < count; nc++)
-- 
2.43.0.rc1.1336.g36b5255a03ac


  reply	other threads:[~2024-10-21 13:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 13:34 [PATCH v3 0/5] platform/x86: intel_scu_ipc: Avoid working around IO and cleanups Andy Shevchenko
2024-10-21 13:34 ` Andy Shevchenko [this message]
2024-10-21 13:34 ` [PATCH v3 2/5] platform/x86: intel_scu_ipc: Replace workaround by 32-bit IO Andy Shevchenko
2024-10-21 13:34 ` [PATCH v3 3/5] platform/x86: intel_scu_ipc: Simplify code with cleanup helpers Andy Shevchenko
2024-10-21 13:34 ` [PATCH v3 4/5] platform/x86: intel_scu_ipc: Convert to check for errors first Andy Shevchenko
2024-10-21 13:34 ` [PATCH v3 5/5] platform/x86: intel_scu_ipc: Save a copy of the entire struct intel_scu_ipc_data Andy Shevchenko
2024-10-22  8:57 ` [PATCH v3 0/5] platform/x86: intel_scu_ipc: Avoid working around IO and cleanups Ilpo Järvinen

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=20241021133705.2933464-2-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=fntoth@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.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