linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexis RODET <alexis.rodet@bvs-tech.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: David Brownell <david-b@pacbell.net>,
	spi-devel-general@lists.sourceforge.net,
	Baruch Siach <baruch@tkos.co.il>,
	linux-mtd@lists.infradead.org,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
Date: Mon, 24 Jan 2011 12:37:22 +0100	[thread overview]
Message-ID: <4D3D6472.8030505@bvs-tech.com> (raw)
In-Reply-To: <20110121192819.GA32112@angua.secretlab.ca>

[-- Attachment #1: Type: text/plain, Size: 2625 bytes --]

Hello Grant,

On 21/01/2011 20:28, Grant Likely wrote :
> Hi Alexis,
>
> Patch doesn't apply.  Looks like it's whitespace damaged (tabs
> converted to spaces).  Did you try to cut & paste it?  git send-email
> is a more reliable way to post patches.
Yes I did, sorry I hadn't installed git-send-email.
OK I'll do this way.
Get my patch in next e-mail.
> Also, for a change as far-reaching as this you should do it in two
> stages; rename the structure, but leave a #define to the old name so
> that conflicts aren't generated in linux-next.  Then remove the
> #define after the change makes it into Linus' tree.
And I keep changing all source code that use this structure, don't I ?
>> Here is the command line used for doing this:
>> find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include <linux/spi/flash.h>' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print
> This looks to me like it will miss any files that include
> linux/spi/flash.h indirectly (ie, if they include a header that
> includes linux/spi/flash.h).  A simple 'git grep flash_platform_data'
> could very well be sufficient for finding the call sites.
Yes, I knew this might be a problem.
I checked this and this doesn't happen:
There is no ".h" file that include linux/spi/flash.h so their can't be indirect use.
I checked also any ".h" file that have 'struct flash_platform_data' and I found:
./arch/arm/mach-ixp2000/include/mach/platform.h
./arch/arm/mach-sa1100/generic.h
./arch/arm/include/asm/mach/flash.h
that are all related in source code to the last one.

After my patch, the only files that have struct flash_platform_data without #include <asm/mach/flash.h> are the 3 .h files above and ./drivers/mtd/onenand/generic.c inside a comment:
29: * with the name "onenand" used to take struct flash_platform_data.

> That being said, is it really worth making this change?  What is your
> motivation?  There isn't actually anything spi-specific in the
> flash_platform_data structure.
The main problem is there are 2 different struct flash_platform_data
1 in include/linux/spi/flash.h for SPI flash devices that work with SPI API (also through MTD).
1 in arm/include/asm/mach/flash.h for other mtd flash devices (NOR, NAND...) that work with MTD API.

The one in SPI is more recent and less used in source code, so this one should not have got the same name and the work is easier.

My motivation is I have a machine with both SPI and NOR/NAND that need both structures and ".h" files conflicts.

Alexis


[-- Attachment #2: alexis_rodet.vcf --]
[-- Type: text/x-vcard, Size: 316 bytes --]

begin:vcard
fn:Alexis RODET
n:RODET;Alexis
org:Brain Vision Systems
adr:;;32 rue du Javelot;PARIS;;75013;FRANCE
email;internet:alexis.rodet@bvs-tech.com
title:Hardware Engineer
tel;work:+33 9 53 92 14 41
tel;fax:+33 9 58 92 14 41
x-mozilla-html:FALSE
url:http://www.bvs-tech.com
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2011-01-24 11:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101117160514.GA5308@n2100.arm.linux.org.uk>
     [not found] ` <4CE6B27D.2000909@bvs-tech.com>
     [not found]   ` <20101121044720.GA6088@tarshish>
2010-11-22  9:58     ` [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h Alexis RODET
2010-11-22 13:59       ` David Brownell
2010-11-22 14:15         ` Alexis RODET
     [not found]           ` <4CEA7AF0.6000804-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2010-11-22 21:52             ` David Brownell
     [not found]               ` <327178.68946.qm-g47maUHHHF/6X00i2u5GFvu2YVrzzGjVVpNB7YpNyf8@public.gmane.org>
2010-11-23  9:30                 ` Alexis RODET
2010-11-23  9:36                   ` Baruch Siach
     [not found]                     ` <20101123093643.GC6156-X57xyCW21FZ5l4KbKkTfamZHpeb/A1Y/@public.gmane.org>
2010-11-23  9:41                       ` Alexis RODET
2010-11-23  9:44                         ` Baruch Siach
     [not found]                           ` <20101123094414.GD6156-X57xyCW21FZ5l4KbKkTfamZHpeb/A1Y/@public.gmane.org>
2010-11-23  9:55                             ` Alexis RODET
     [not found]                               ` <4CEB8F7C.6070102-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2011-01-21 19:28                                 ` Grant Likely
2011-01-24 11:37                                   ` Alexis RODET [this message]
2011-01-24 15:16                                     ` [PATCH 1/1] " Alexis RODET
     [not found]                                     ` <4D3D6472.8030505-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2011-01-24 15:16                                       ` Alexis RODET
2011-01-24 15:49                                       ` [PATCH 0/1] " Alexis RODET
     [not found]                                         ` <4D3D9FA6.3050900-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2011-01-24 17:52                                           ` Grant Likely
     [not found]                                             ` <AANLkTikDHbKt5q+o2LK89hHZ3EUeeYzmQVJj8jXgQ+pB-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-25  9:23                                               ` Alexis RODET
2011-01-31 11:29                                                 ` [PATCH 1/1] merging arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h into single header file include/linux/mtd/flash.h Alexis RODET
     [not found]                                                 ` <4D3E9683.5090906-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2011-01-31 11:29                                                   ` Alexis RODET
     [not found]                                                     ` <1296473351-22771-1-git-send-email-alexis.rodet-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2011-07-10  7:38                                                       ` Grant Likely
2011-01-25  9:40                                               ` [PATCH 0/1] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h Alexis RODET
     [not found]                                                 ` <4D3E9AA1.4020308-zROAmvwsW6hWk0Htik3J/w@public.gmane.org>
2011-01-26 14:35                                                   ` Josh Boyer

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=4D3D6472.8030505@bvs-tech.com \
    --to=alexis.rodet@bvs-tech.com \
    --cc=baruch@tkos.co.il \
    --cc=david-b@pacbell.net \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-mtd@lists.infradead.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).