From: Ismael Luceno <ismael@iodev.co.uk>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org,
Mathias Nyman <mathias.nyman@intel.com>,
Anton Sviridenko <anton@corp.bluecherry.net>,
Andrey Utkin <andrey.utkin@corp.bluecherry.net>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH v2 2/8] media: solo6x10: Make use of cpu_to_le16_array()
Date: Tue, 18 Aug 2020 00:18:15 +0200 [thread overview]
Message-ID: <20200817221815.GH6339@abuya> (raw)
In-Reply-To: <20200817184659.58419-2-andriy.shevchenko@linux.intel.com>
On 17/Aug/2020 21:46, Andy Shevchenko wrote:
> Since we have a new helper, let's replace open coded variant by it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Anton Sviridenko <anton@corp.bluecherry.net>
> Cc: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> Cc: Ismael Luceno <ismael@iodev.co.uk>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> v2: new patch
> drivers/media/pci/solo6x10/solo6x10-disp.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/pci/solo6x10/solo6x10-disp.c b/drivers/media/pci/solo6x10/solo6x10-disp.c
> index ad98ca7fb98b..09c0cf8a5fcb 100644
> --- a/drivers/media/pci/solo6x10/solo6x10-disp.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-disp.c
> @@ -202,16 +202,15 @@ int solo_set_motion_block(struct solo_dev *solo_dev, u8 ch,
> {
> const unsigned size = sizeof(u16) * 64;
> u32 off = SOLO_MOT_FLAG_AREA + ch * SOLO_MOT_THRESH_SIZE * 2;
> + unsigned int y;
> __le16 *buf;
> - int x, y;
> int ret = 0;
>
> buf = kzalloc(size, GFP_KERNEL);
> if (buf == NULL)
> return -ENOMEM;
> for (y = 0; y < SOLO_MOTION_SZ; y++) {
> - for (x = 0; x < SOLO_MOTION_SZ; x++)
> - buf[x] = cpu_to_le16(thresholds[y * SOLO_MOTION_SZ + x]);
> + cpu_to_le16_array(buf, &thresholds[y * SOLO_MOTION_SZ], SOLO_MOTION_SZ);
> ret |= solo_p2m_dma(solo_dev, 1, buf,
> SOLO_MOTION_EXT_ADDR(solo_dev) + off + y * size,
> size, 0, 0);
> --
> 2.28.0
>
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
next prev parent reply other threads:[~2020-08-17 22:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 18:46 [PATCH v2 1/8] byteorder: Introduce cpu_to_le16_array() and le16_to_cpu_array() Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 2/8] media: solo6x10: Make use of cpu_to_le16_array() Andy Shevchenko
2020-08-17 22:18 ` Ismael Luceno [this message]
2020-08-17 18:46 ` [PATCH v2 3/8] rndis_wlan: " Andy Shevchenko
2020-08-17 22:02 ` kernel test robot
2020-08-18 5:36 ` Kalle Valo
2020-08-18 5:36 ` Jussi Kivilinna
2020-08-17 18:46 ` [PATCH v2 4/8] i40e: Make use of le16_to_cpu_array() Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 5/8] ice: " Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 6/8] usb: early: xhci-dbc: use readl_poll_timeout() to simplify code Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 7/8] usb: early: xhci-dbc: Make use of cpu_to_le16_array() Andy Shevchenko
2020-08-17 21:23 ` kernel test robot
2020-08-17 18:46 ` [PATCH v2 8/8] usb: early: xhci-dbc: Move asm/* headers after linux/* Andy Shevchenko
2020-08-18 8:01 ` [PATCH v2 1/8] byteorder: Introduce cpu_to_le16_array() and le16_to_cpu_array() 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=20200817221815.GH6339@abuya \
--to=ismael@iodev.co.uk \
--cc=andrey.utkin@corp.bluecherry.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anton@corp.bluecherry.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mchehab@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;
as well as URLs for NNTP newsgroup(s).