From: Dipen Patel <dipenp@nvidia.com>
To: Kent Gibson <warthog618@gmail.com>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
brgl@bgdev.pl, linus.walleij@linaro.org,
andy.shevchenko@gmail.com
Subject: Re: [PATCH v2 0/6] gpiolib: cdev: code cleanup following hte integration
Date: Mon, 18 Jul 2022 14:32:03 -0700 [thread overview]
Message-ID: <57f1b92b-3422-7d3c-96ae-10ad5d3d22c4@nvidia.com> (raw)
In-Reply-To: <20220714020319.72952-1-warthog618@gmail.com>
On 7/13/22 7:03 PM, Kent Gibson wrote:
> This patch series is a collection of improvements to simplify the
> code, improve readability, and compile out unused code.
> There are no functional changes.
>
> The first patch is a cleanup for my recent linereq_free() fix. I
> noted then that the edge_detector_stop() could probably be safely
> moved inside the line desc check block, but wanted to keep that
> change minimal just in case. It can be safely moved, and so here
> it is.
>
> Patch 2 makes use of an existing macro to simplify a call.
>
> Patch 3 replaces some more if-else chains with switches, which is
> more readable (YMMV).
>
> Patch 4 reorganizes the line identification code to share code
> common to alternate paths.
>
> Patch 5 consolidates a number of separate flags into one. This
> reduces code complexity, simplifies any future edge source additions,
> and makes patch 6 significantly simpler.
>
> Patch 6 totally compiles out the hte specific code when CONFIG_HTE
> is not selected.
>
> I've based this series on gpio/for-current, as it requires the fix
> patch -
> commit c8e27a4a5136 ("gpiolib: cdev: fix null pointer dereference in linereq_free()")
> Happy to rebase if that doesn't suit.
>
> Dipen, I don't have any HTE compatible hardware to test with, so
> could you check that this still works for you?
Only hte logic
Tested-by: Dipen Patel <dipenp@nvidia.com>
>
> Changes v1 -> v2:
> Address Andy's review comments, specifically
> - Patch 4 move ternary initializer into a helper function.
> - Patch 5 variable declaration ordering.
> - Patch 6 remove obsoleted comment and tidy some if expressions.
>
> Kent Gibson (6):
> gpiolib: cdev: simplify linereq_free
> gpiolib: cdev: simplify parameter in call to hte_edge_setup
> gpiolib: cdev: replace if-else chains with switches
> gpiolib: cdev: simplify line event identification
> gpiolib: cdev: consolidate edge detector configuration flags
> gpiolib: cdev: compile out HTE unless CONFIG_HTE selected
>
> drivers/gpio/gpiolib-cdev.c | 291 +++++++++++++++++++-----------------
> 1 file changed, 151 insertions(+), 140 deletions(-)
>
>
> base-commit: 7329b071729645e243b6207e76bca2f4951c991b
next prev parent reply other threads:[~2022-07-18 21:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 2:03 Kent Gibson
2022-07-14 2:03 ` [PATCH v2 1/6] gpiolib: cdev: simplify linereq_free Kent Gibson
2022-07-15 5:09 ` Dipen Patel
2022-07-18 9:28 ` Linus Walleij
2022-07-14 2:03 ` [PATCH v2 2/6] gpiolib: cdev: simplify parameter in call to hte_edge_setup Kent Gibson
2022-07-15 5:10 ` Dipen Patel
2022-07-18 9:29 ` Linus Walleij
2022-07-14 2:03 ` [PATCH v2 3/6] gpiolib: cdev: replace if-else chains with switches Kent Gibson
2022-07-18 9:30 ` Linus Walleij
2022-07-14 2:03 ` [PATCH v2 4/6] gpiolib: cdev: simplify line event identification Kent Gibson
2022-07-18 9:31 ` Linus Walleij
2022-07-14 2:03 ` [PATCH v2 5/6] gpiolib: cdev: consolidate edge detector configuration flags Kent Gibson
2022-07-18 9:33 ` Linus Walleij
2022-07-18 9:46 ` Kent Gibson
2022-07-14 2:03 ` [PATCH v2 6/6] gpiolib: cdev: compile out HTE unless CONFIG_HTE selected Kent Gibson
2022-07-18 9:34 ` Linus Walleij
2022-07-18 21:32 ` Dipen Patel [this message]
2022-07-19 8:03 ` [PATCH v2 0/6] gpiolib: cdev: code cleanup following hte integration Bartosz Golaszewski
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=57f1b92b-3422-7d3c-96ae-10ad5d3d22c4@nvidia.com \
--to=dipenp@nvidia.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=warthog618@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®