All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-can <linux-can@vger.kernel.org>
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Subject: [PATCH v3 0/2] can: etas_es58x: clean-up of new GCC W=1 and old checkpath warnings
Date: Sun, 24 Sep 2023 20:06:46 +0900	[thread overview]
Message-ID: <20230924110914.183898-1-mailhol.vincent@wanadoo.fr> (raw)
In-Reply-To: <20230914112954.3067242-1-mailhol.vincent@wanadoo.fr>

The kernel recently added new warnings, one of which triggers a known
false positive on the etas_es58x module. In an effort to keep
es58x_etas free of any W=12 (excluding those produced by foreign
headers), add a workaround to silence it.

While at it, this series also fix a checkpatch warning which I knew
existed for a long time but was too lazy to tackle.

* Changelog *

v2 -> v3:

  * if the parsing of one of the version/revision numbers fail,
    es58x_parse_product_info() immediately returns. If this occurs
    early, the other version/revision numbers would still be set to
    zero (which is now considered a valid version number). Set the
    version and revision to an invalid number before startnig the
    parsing so that everything is set even if an early return occurs.

v1 -> v2:

  * v1 had two different check logics for the version numbers:

    - check that none of the sub-version number are zero to make sure
      the parsing succeeded  
    - check that all of the sub-version number fit the expected digit
      range to please GCC.

    v2 simplifies things by merging those two logics together.

Vincent Mailhol (2):
  can: etas_es58x: rework the version check logic to silence
    -Wformat-truncation
  can: etas_es58x: add missing a blank line after declaration

 drivers/net/can/usb/etas_es58x/es58x_core.c   |  1 +
 drivers/net/can/usb/etas_es58x/es58x_core.h   |  6 +-
 .../net/can/usb/etas_es58x/es58x_devlink.c    | 57 +++++++++++++------
 3 files changed, 43 insertions(+), 21 deletions(-)

-- 
2.41.0


  parent reply	other threads:[~2023-09-24 11:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 11:29 [PATCH v1 0/2] can: etas_es58x: clean-up of new GCC W=1 and old checkpath warnings Vincent Mailhol
2023-09-14 11:29 ` [PATCH v1 1/2] can: etas_es58x: silence -Wformat-truncation Vincent Mailhol
2023-09-14 11:29 ` [PATCH v1 2/2] can: etas_es58x: add missing a blank line after declaration Vincent Mailhol
2023-09-15  5:48 ` [PATCH v2 0/2] can: etas_es58x: clean-up of new GCC W=1 and old checkpath warnings Vincent Mailhol
2023-09-15  5:48   ` [PATCH v2 1/2] can: etas_es58x: rework the version check logic to silence -Wformat-truncation Vincent Mailhol
2023-09-15  5:48   ` [PATCH v2 2/2] can: etas_es58x: add missing a blank line after declaration Vincent Mailhol
2023-09-24 11:06 ` Vincent Mailhol [this message]
2023-09-24 11:06   ` [PATCH v3 1/2] can: etas_es58x: rework the version check logic to silence -Wformat-truncation Vincent Mailhol
2023-09-24 11:06   ` [PATCH v3 2/2] can: etas_es58x: add missing a blank line after declaration Vincent Mailhol
2023-10-04 10:19   ` [PATCH v3 0/2] can: etas_es58x: clean-up of new GCC W=1 and old checkpath warnings Marc Kleine-Budde

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=20230924110914.183898-1-mailhol.vincent@wanadoo.fr \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.