All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ayush Singh <ayushdevel1325@gmail.com>
To: rujra <braker.noob.kernel@gmail.com>,
	johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, outreachy@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Subject: Re: [FIRST-PATCH] staging : greybus : gb-beagleplay.c : fixing the checks as first-patch
Date: Wed, 16 Apr 2025 19:13:02 +0530	[thread overview]
Message-ID: <490ab216-982e-4707-abe4-a5b8d0444458@gmail.com> (raw)
In-Reply-To: <CAG+54DbvpWHyX8+ucEQpg2B6rNTJP11CRpYxcYVrKpKehzrK-A@mail.gmail.com>

On 4/16/25 17:47, rujra wrote:

> added comments on spinlocks for producer-consumer model, rearranged the
> lines on function calls where it should not end with "(" this bracket,
> also removed white-spaces and aligned the arguments of function calls.

Are these manual adjustments, or using clang-format?

I do not care about formatting being "readable". As long as it can be 
done by a tool like clang-format, that's fine with me.

Of course if you are fixing some checkpatch error, that is okay, but if 
now, please avoid formatting changes.

The comments are fine. Although you probably want to add a space between 
`//` and the sentence start.


>
> Signed-off-by: Rujra Bhatt <braker.noob.kernel@gmail.com>
>
>> 8------------------------------------------------------8<
>   drivers/greybus/gb-beagleplay.c | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c
> index 473ac3f2d382..fa1c3a40dd0b 100644
> --- a/drivers/greybus/gb-beagleplay.c
> +++ b/drivers/greybus/gb-beagleplay.c
> @@ -73,7 +73,9 @@ struct gb_beagleplay {
>          struct gb_host_device *gb_hd;
>
>          struct work_struct tx_work;
> +       //used to ensure that only one producer can access the shared
> resource at a time.
>          spinlock_t tx_producer_lock;
> +       //used to ensure that only one consumer can access the shared
> resource at a time.
>          spinlock_t tx_consumer_lock;
>          struct circ_buf tx_circ_buf;
>          u16 tx_crc;
> @@ -642,8 +644,8 @@ static int cc1352_bootloader_wait_for_ack(struct
> gb_beagleplay *bg)
>   {
>          int ret;
>
> -       ret = wait_for_completion_timeout(
> -               &bg->fwl_ack_com, msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));
> +       ret = wait_for_completion_timeout(&bg->fwl_ack_com,
> +
> msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));
>          if (ret < 0)
>                  return dev_err_probe(&bg->sd->dev, ret,
>                                       "Failed to acquire ack semaphore");
> @@ -680,9 +682,8 @@ static int cc1352_bootloader_get_status(struct
> gb_beagleplay *bg)
>          if (ret < 0)
>                  return ret;
>
> -       ret = wait_for_completion_timeout(
> -               &bg->fwl_cmd_response_com,
> -               msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));
> +       ret = wait_for_completion_timeout(&bg->fwl_cmd_response_com,
> +
> msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));
>          if (ret < 0)
>                  return dev_err_probe(&bg->sd->dev, ret,
>                                       "Failed to acquire last status semaphore");
> @@ -765,9 +766,8 @@ static int cc1352_bootloader_crc32(struct
> gb_beagleplay *bg, u32 *crc32)
>          if (ret < 0)
>                  return ret;
>
> -       ret = wait_for_completion_timeout(
> -               &bg->fwl_cmd_response_com,
> -               msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));
> +       ret = wait_for_completion_timeout(&bg->fwl_cmd_response_com,
> +
> msecs_to_jiffies(CC1352_BOOTLOADER_TIMEOUT));
>          if (ret < 0)
>                  return dev_err_probe(&bg->sd->dev, ret,
>                                       "Failed to acquire last status semaphore");
> --
> 2.43.0


Best Regards,

Ayush Singh


  reply	other threads:[~2025-04-16 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 12:17 [FIRST-PATCH] staging : greybus : gb-beagleplay.c : fixing the checks as first-patch rujra
2025-04-16 13:43 ` Ayush Singh [this message]
2025-04-16 13:45   ` Julia Lawall
2025-04-16 13:51 ` Johan Hovold
     [not found]   ` <CAG+54DbMYHDRMs+P1GcSYdqKJn+EBNA2xxXZfeWCX4DK+b31+g@mail.gmail.com>
2025-04-16 17:11     ` [greybus-dev] " Jeff Johnson

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=490ab216-982e-4707-abe4-a5b8d0444458@gmail.com \
    --to=ayushdevel1325@gmail.com \
    --cc=braker.noob.kernel@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=outreachy@lists.linux.dev \
    /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.