devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>, Ian Ray <ian.ray@ge.com>,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCHv7 3/3] misc: gehc-achc: new driver
Date: Wed, 21 Jul 2021 18:13:44 +0200	[thread overview]
Message-ID: <YPhHuNkDPS5EH7s9@kroah.com> (raw)
In-Reply-To: <20210713163528.119185-4-sebastian.reichel@collabora.com>

On Tue, Jul 13, 2021 at 06:35:28PM +0200, Sebastian Reichel wrote:
> General Electric Healthcare's PPD has a secondary processor from
> NXP's Kinetis K20 series. That device has two SPI chip selects:
> 
> The main interface's behaviour depends on the loaded firmware
> and is currently unused.
> 
> The secondary interface can be used to update the firmware using
> EzPort protocol. This is implemented by this driver using the
> kernel's firmware API. The firmware is being flashed into
> non-volatile flash memory, so it is enough to flash it once
> and not on every boot. Flashing will wear the flash memory
> (it has a life time of at least 10k programming cycles) and
> takes 3 minutes with the microcontroller being unusable. At
> the same time only occasional FW updates are expected (like e.g.
> a BIOS update). Thus the firmware update is triggered via sysfs
> instead of doing it in the driver's probe routine like many
> other drivers.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  .../ABI/testing/sysfs-driver-ge-achc          |  14 +
>  drivers/misc/Kconfig                          |  11 +
>  drivers/misc/Makefile                         |   1 +
>  drivers/misc/gehc-achc.c                      | 542 ++++++++++++++++++
>  drivers/spi/spidev.c                          |   1 -
>  5 files changed, 568 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/ABI/testing/sysfs-driver-ge-achc
>  create mode 100644 drivers/misc/gehc-achc.c

This patch gives me build warnings:

drivers/misc/gehc-achc.c: In function ‘ezport_firmware_compare_data’:
./include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~
./include/linux/minmax.h:26:18: note: in expansion of macro ‘__typecheck’
   26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
      |                  ^~~~~~~~~~~
./include/linux/minmax.h:36:31: note: in expansion of macro ‘__safe_cmp’
   36 |         __builtin_choose_expr(__safe_cmp(x, y), \
      |                               ^~~~~~~~~~
./include/linux/minmax.h:45:25: note: in expansion of macro ‘__careful_cmp’
   45 | #define min(x, y)       __careful_cmp(x, y, <)
      |                         ^~~~~~~~~~~~~
drivers/misc/gehc-achc.c:305:33: note: in expansion of macro ‘min’
  305 |                 transfer_size = min((u32) EZPORT_TRANSFER_SIZE, size - address);
      |                                 ^~~
drivers/misc/gehc-achc.c: In function ‘ezport_firmware_flash_data’:
./include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~
./include/linux/minmax.h:26:18: note: in expansion of macro ‘__typecheck’
   26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
      |                  ^~~~~~~~~~~
./include/linux/minmax.h:36:31: note: in expansion of macro ‘__safe_cmp’
   36 |         __builtin_choose_expr(__safe_cmp(x, y), \
      |                               ^~~~~~~~~~
./include/linux/minmax.h:45:25: note: in expansion of macro ‘__careful_cmp’
   45 | #define min(x, y)       __careful_cmp(x, y, <)
      |                         ^~~~~~~~~~~~~
drivers/misc/gehc-achc.c:347:33: note: in expansion of macro ‘min’
  347 |                 transfer_size = min((u32) EZPORT_TRANSFER_SIZE, size - address);
      |                                 ^~~


How did you test build this?

thanks,

greg k-h

      reply	other threads:[~2021-07-21 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 16:35 [PATCHv7 0/3] GE Healthcare PPD firmware upgrade driver for ACHC Sebastian Reichel
2021-07-13 16:35 ` [PATCHv7 1/3] dt-bindings: misc: ge-achc: Convert to DT schema format Sebastian Reichel
2021-07-13 16:35 ` [PATCHv7 2/3] ARM: dts: imx53-ppd: Fix ACHC entry Sebastian Reichel
2021-07-13 16:35 ` [PATCHv7 3/3] misc: gehc-achc: new driver Sebastian Reichel
2021-07-21 16:13   ` Greg Kroah-Hartman [this message]

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=YPhHuNkDPS5EH7s9@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=ian.ray@ge.com \
    --cc=kernel@collabora.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=shawnguo@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).