public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenz@kernel.org>
To: "Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Nicolas Saenz Julienne" <nsaenzjulienne@suse.de>
Cc: arnd@arndb.de, Nicolas Saenz Julienne <nsaenz@kernel.org>,
	kernel test robot <lkp@intel.com>,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] pwm: raspberrypi-poe: Fix mailbox message initialization
Date: Fri,  9 Apr 2021 11:08:19 +0200	[thread overview]
Message-ID: <20210409090819.24805-1-nsaenz@kernel.org> (raw)

For testing purposes this driver might be built on big-endian
architectures. So make sure we take that into account when populating
structures that are to be passed to RPi4's mailbox.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 79caa362eab6 ("pwm: Add Raspberry Pi Firmware based PWM bus")
Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---

@arndb: This was just meged into the arm-soc tree some days ago. Should I
prepare a second PR once it's been reviewed?

 drivers/pwm/pwm-raspberrypi-poe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-raspberrypi-poe.c b/drivers/pwm/pwm-raspberrypi-poe.c
index 043fc32e8be8..78423e66f4fc 100644
--- a/drivers/pwm/pwm-raspberrypi-poe.c
+++ b/drivers/pwm/pwm-raspberrypi-poe.c
@@ -66,7 +66,7 @@ static int raspberrypi_pwm_get_property(struct rpi_firmware *firmware,
 					u32 reg, u32 *val)
 {
 	struct raspberrypi_pwm_prop msg = {
-		.reg = reg
+		.reg = cpu_to_le32(reg),
 	};
 	int ret;
 
-- 
2.30.2


             reply	other threads:[~2021-04-09  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  9:08 Nicolas Saenz Julienne [this message]
2021-04-09 11:35 ` [PATCH] pwm: raspberrypi-poe: Fix mailbox message initialization Thierry Reding
2021-04-09 20:09 ` Arnd Bergmann

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=20210409090819.24805-1-nsaenz@kernel.org \
    --to=nsaenz@kernel.org \
    --cc=arnd@arndb.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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