From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 2/4] spi: Remove uses of #ifndef __U_BOOT__ from spi-mem.c
Date: Sun, 25 Oct 2020 15:21:13 -0400 [thread overview]
Message-ID: <0897a97a-1630-b0ec-9e27-06d1aa940d47@gmail.com> (raw)
In-Reply-To: <CAMty3ZBiDfnfnEEbi8GJ_zao0wq51zsjmyXJNUdbqu-ZZfp9Dg@mail.gmail.com>
On 10/23/20 2:26 PM, Jagan Teki wrote:
> On Fri, Aug 7, 2020 at 10:43 PM Sean Anderson <seanga2@gmail.com> wrote:
>>
>> Preprocessing out large sections of the file is confusing and makes it
>> difficult to follow the control flow. Presumably these were initially added
>> to make porting easier, but this code has not been synced with Linux since
>> it was introduced two years ago.
>>
>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>> ---
>>
>> Changes in v2:
>> - Don't remove in-use headers
>> - Split removal of EXPORT_SYMBOL_GPL into another patch
>>
>> drivers/spi/spi-mem.c | 273 ------------------------------------------
>> 1 file changed, 273 deletions(-)
>>
>> diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
>> index c095ae9505..d7209837d0 100644
>> --- a/drivers/spi/spi-mem.c
>> +++ b/drivers/spi/spi-mem.c
>> @@ -6,13 +6,6 @@
>> * Author: Boris Brezillon <boris.brezillon@bootlin.com>
>> */
>>
>> -#ifndef __UBOOT__
>
> I think these ifdef to track Linux change. Of course, I'm not fond of
> these changes, if Vignesh is fine I'll push.
I'm not particularly attached to this patch. However, it can be quite
difficult to read this file because of how much code is ifdef'd out.
Entire functions (spi_controller_dma_(un)map_mem_op_data,
spi_mem_{probe,shutdown,remove}, etc.) are included but ifdef'd out.
When reading this code, I often found myself reading some code only to
realize that it wouldn't be compiled.
--Sean
next prev parent reply other threads:[~2020-10-25 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 17:13 [PATCH v2 0/4] Misc fixes/cleanup Sean Anderson
2020-08-07 17:13 ` [PATCH v2 1/4] doc: Fix typo in FIT documentation Sean Anderson
2020-08-07 17:13 ` [PATCH v2 2/4] spi: Remove uses of #ifndef __U_BOOT__ from spi-mem.c Sean Anderson
2020-10-23 18:26 ` Jagan Teki
2020-10-25 19:21 ` Sean Anderson [this message]
2020-10-26 10:24 ` Wolfgang Denk
2020-08-07 17:13 ` [PATCH v2 3/4] spi: Remove some instances of EXPORT_SYMBOL_GPL Sean Anderson
2020-08-07 17:13 ` [PATCH v2 4/4] spi: Fix typo in header Sean Anderson
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=0897a97a-1630-b0ec-9e27-06d1aa940d47@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox