All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérôme Pouiller" <Jerome.Pouiller@silabs.com>
To: Matthew Hanzelik <mrhanzelik@gmail.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>
Subject: Re: [PATCH v2] Staging: wfx: Fix style issues with hif_rx.c
Date: Sun, 29 Dec 2019 09:47:01 +0000	[thread overview]
Message-ID: <3570432.mCMjMbKv1p@pc-42> (raw)
In-Reply-To: <20191228003818.mmcf4aasks5mqcnr@mandalore.localdomain>

On Saturday 28 December 2019 01:38:24 CET Matthew Hanzelik wrote:
> Fixes the 80 character line limit warning on line 79 of hif_rx.c.
> 
> Also fixes the missing blank line warning on line 305 of hif_rx.c after
> the declaration of size_t len.
> 
> Signed-off-by: Matthew Hanzelik <mrhanzelik@gmail.com>
> ---
> Changes in v2:
>  - Make the commit message less vague.
> 
>  drivers/staging/wfx/hif_rx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
> index 820de216be0c..1da9a153dda0 100644
> --- a/drivers/staging/wfx/hif_rx.c
> +++ b/drivers/staging/wfx/hif_rx.c
> @@ -76,7 +76,8 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, struct hif_msg *hif,
>                                 void *buf)
>  {
>         struct hif_cnf_multi_transmit *body = buf;
> -       struct hif_cnf_tx *buf_loc = (struct hif_cnf_tx *) &body->tx_conf_payload;
> +       struct hif_cnf_tx *buf_loc = (struct hif_cnf_tx *)
> +                                     &body->tx_conf_payload;

Since cast operator is an unary operator, I would try to avoid line break
between cast and variable. I suggest to place the break after the '='.



>         struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
>         int count = body->num_tx_confs;
>         int i;
> @@ -302,6 +303,7 @@ static int hif_exception_indication(struct wfx_dev *wdev,
>                                     struct hif_msg *hif, void *buf)
>  {
>         size_t len = hif->len - 4; // drop header
> +
>         dev_err(wdev->dev, "firmware exception\n");
>         print_hex_dump_bytes("Dump: ", DUMP_PREFIX_NONE, buf, len);
>         wdev->chip_frozen = 1;
Ack.

-- 
Jérôme Pouiller


WARNING: multiple messages have this Message-ID (diff)
From: "Jérôme Pouiller" <Jerome.Pouiller@silabs.com>
To: Matthew Hanzelik <mrhanzelik@gmail.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] Staging: wfx: Fix style issues with hif_rx.c
Date: Sun, 29 Dec 2019 09:47:01 +0000	[thread overview]
Message-ID: <3570432.mCMjMbKv1p@pc-42> (raw)
In-Reply-To: <20191228003818.mmcf4aasks5mqcnr@mandalore.localdomain>

On Saturday 28 December 2019 01:38:24 CET Matthew Hanzelik wrote:
> Fixes the 80 character line limit warning on line 79 of hif_rx.c.
> 
> Also fixes the missing blank line warning on line 305 of hif_rx.c after
> the declaration of size_t len.
> 
> Signed-off-by: Matthew Hanzelik <mrhanzelik@gmail.com>
> ---
> Changes in v2:
>  - Make the commit message less vague.
> 
>  drivers/staging/wfx/hif_rx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
> index 820de216be0c..1da9a153dda0 100644
> --- a/drivers/staging/wfx/hif_rx.c
> +++ b/drivers/staging/wfx/hif_rx.c
> @@ -76,7 +76,8 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, struct hif_msg *hif,
>                                 void *buf)
>  {
>         struct hif_cnf_multi_transmit *body = buf;
> -       struct hif_cnf_tx *buf_loc = (struct hif_cnf_tx *) &body->tx_conf_payload;
> +       struct hif_cnf_tx *buf_loc = (struct hif_cnf_tx *)
> +                                     &body->tx_conf_payload;

Since cast operator is an unary operator, I would try to avoid line break
between cast and variable. I suggest to place the break after the '='.



>         struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
>         int count = body->num_tx_confs;
>         int i;
> @@ -302,6 +303,7 @@ static int hif_exception_indication(struct wfx_dev *wdev,
>                                     struct hif_msg *hif, void *buf)
>  {
>         size_t len = hif->len - 4; // drop header
> +
>         dev_err(wdev->dev, "firmware exception\n");
>         print_hex_dump_bytes("Dump: ", DUMP_PREFIX_NONE, buf, len);
>         wdev->chip_frozen = 1;
Ack.

-- 
Jérôme Pouiller

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2019-12-29  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-28  0:38 [PATCH v2] Staging: wfx: Fix style issues with hif_rx.c Matthew Hanzelik
2019-12-28  0:38 ` Matthew Hanzelik
2019-12-29  9:47 ` Jérôme Pouiller [this message]
2019-12-29  9:47   ` Jérôme Pouiller

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=3570432.mCMjMbKv1p@pc-42 \
    --to=jerome.pouiller@silabs.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrhanzelik@gmail.com \
    /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.