linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] modpost: don't add a trailing wildcard for OF module aliases
@ 2015-12-08 22:13 Javier Martinez Canillas
  2015-12-08 23:11 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Javier Martinez Canillas @ 2015-12-08 22:13 UTC (permalink / raw)
  To: linux-arm-kernel

Commit ac551828993ee ("modpost: i2c aliases need no trailing wildcard")
removed the wildcard at the end of the I2C module aliases because I2C
devices have no IDs so the aliases are just arbitrary device names.

This is also true for OF modaliases since a compatible string is used
to define a specific IP hardware block. So the modalias should match a
specific compatible string and not attempt to match a compatible string
whose name matches the beginning of another one.

For example, the following driver module:

$ modinfo cros_ec_keyb | grep alias
alias:          platform:cros-ec-keyb
alias:          of:N*T*Cgoogle,cros-ec-keyb*

will be tried to be loaded for an alias of:N*T*Cgoogle,cros-ec-keyb-v2
but there could be a different driver that supports the device for that
compatible string so it's better to remove the trailing wildcard for OF.

Also, remove the word "always" from the add_wildcard() function comment
since that was carried from the time where a wildcard was always added
at the end of the module alias for all the devices.

Suggested-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

---
Hello,

I sent this patch before [0] but was never picked. MAINTAINERS doesn't
say who should manage patches to file2alias so maybe I didn't add the
right person to the cc list.

Documentation/development-process/5.Posting says that if there is no
obvious maintainer, then Andrew Morton is often the patch target so
I'm re-sending to him.

Best regards,
Javier

 scripts/mod/file2alias.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 5b96206e9aab..65eaab8b7798 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -125,7 +125,7 @@ do {                                                            \
                 sprintf(str + strlen(str), "*");                \
 } while(0)
 
-/* Always end in a wildcard, for future extension */
+/* End in a wildcard, for future extension */
 static inline void add_wildcard(char *str)
 {
 	int len = strlen(str);
@@ -704,7 +704,6 @@ static int do_of_entry (const char *filename, void *symval, char *alias)
 		if (isspace (*tmp))
 			*tmp = '_';
 
-	add_wildcard(alias);
 	return 1;
 }
 ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [RESEND PATCH] modpost: don't add a trailing wildcard for OF module aliases
  2015-12-08 22:13 [RESEND PATCH] modpost: don't add a trailing wildcard for OF module aliases Javier Martinez Canillas
@ 2015-12-08 23:11 ` Andrew Morton
  2015-12-09  2:00   ` Javier Martinez Canillas
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2015-12-08 23:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue,  8 Dec 2015 19:13:32 -0300 Javier Martinez Canillas <javier@osg.samsung.com> wrote:

> Commit ac551828993ee ("modpost: i2c aliases need no trailing wildcard")
> removed the wildcard at the end of the I2C module aliases because I2C
> devices have no IDs so the aliases are just arbitrary device names.
> 
> This is also true for OF modaliases since a compatible string is used
> to define a specific IP hardware block. So the modalias should match a
> specific compatible string and not attempt to match a compatible string
> whose name matches the beginning of another one.
> 
> For example, the following driver module:
> 
> $ modinfo cros_ec_keyb | grep alias
> alias:          platform:cros-ec-keyb
> alias:          of:N*T*Cgoogle,cros-ec-keyb*
> 
> will be tried to be loaded for an alias of:N*T*Cgoogle,cros-ec-keyb-v2
> but there could be a different driver that supports the device for that
> compatible string so it's better to remove the trailing wildcard for OF.
> 
> Also, remove the word "always" from the add_wildcard() function comment
> since that was carried from the time where a wildcard was always added
> at the end of the module alias for all the devices.
> 
> Suggested-by: Brian Norris <computersforpeace@gmail.com>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> 
> ---
> Hello,
> 
> I sent this patch before [0] but was never picked. MAINTAINERS doesn't
> say who should manage patches to file2alias so maybe I didn't add the
> right person to the cc list.

z:/usr/src/git26> perl scripts/get_maintainer.pl -f scripts/mod 
Rusty Russell <rusty@rustcorp.com.au> (commit_signer:18/27=67%)

> Documentation/development-process/5.Posting says that if there is no
> obvious maintainer, then Andrew Morton is often the patch target so
> I'm re-sending to him.

Yep.  If I don't handle the particular patch, I know who does ;)

> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -125,7 +125,7 @@ do {                                                            \
>                  sprintf(str + strlen(str), "*");                \
>  } while(0)
>  
> -/* Always end in a wildcard, for future extension */
> +/* End in a wildcard, for future extension */
>  static inline void add_wildcard(char *str)
>  {
>  	int len = strlen(str);
> @@ -704,7 +704,6 @@ static int do_of_entry (const char *filename, void *symval, char *alias)
>  		if (isspace (*tmp))
>  			*tmp = '_';
>  
> -	add_wildcard(alias);
>  	return 1;
>  }
>  ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
> -- 
> 2.4.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RESEND PATCH] modpost: don't add a trailing wildcard for OF module aliases
  2015-12-08 23:11 ` Andrew Morton
@ 2015-12-09  2:00   ` Javier Martinez Canillas
  2015-12-09  2:02     ` Javier Martinez Canillas
  0 siblings, 1 reply; 4+ messages in thread
From: Javier Martinez Canillas @ 2015-12-09  2:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Andrew,

On 12/08/2015 08:11 PM, Andrew Morton wrote:
> On Tue,  8 Dec 2015 19:13:32 -0300 Javier Martinez Canillas <javier@osg.samsung.com> wrote:

[snip]

>>
>> I sent this patch before [0] but was never picked. MAINTAINERS doesn't
>> say who should manage patches to file2alias so maybe I didn't add the
>> right person to the cc list.
> 
> z:/usr/src/git26> perl scripts/get_maintainer.pl -f scripts/mod 
> Rusty Russell <rusty@rustcorp.com.au> (commit_signer:18/27=67%)
>

Yes, I use get_maintainer.pl but usually with the --no-git-fallback since
the --git-fallback option tends to be too noisy and people complain that
are cc'ed on random patches just because they touched a file in the past.

IOW, there is no way to know only by looking at get_maintainer.pl output
if Rusty has only made a lot of changes to that repo or if he acts as a
maintainer (i.e: picks patches and send pull requests).

For these cases, is good to have a proper entry in MAINTAINERS.
 
>> Documentation/development-process/5.Posting says that if there is no
>> obvious maintainer, then Andrew Morton is often the patch target so
>> I'm re-sending to him.
> 
> Yep.  If I don't handle the particular patch, I know who does ;)
>

I see that you picked the patch already, thanks a lot for your help!

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RESEND PATCH] modpost: don't add a trailing wildcard for OF module aliases
  2015-12-09  2:00   ` Javier Martinez Canillas
@ 2015-12-09  2:02     ` Javier Martinez Canillas
  0 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2015-12-09  2:02 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/08/2015 11:00 PM, Javier Martinez Canillas wrote:
>>>
>>> I sent this patch before [0] but was never picked. MAINTAINERS doesn't
>>> say who should manage patches to file2alias so maybe I didn't add the
>>> right person to the cc list.
>>
>> z:/usr/src/git26> perl scripts/get_maintainer.pl -f scripts/mod 
>> Rusty Russell <rusty@rustcorp.com.au> (commit_signer:18/27=67%)
>>
> 
> Yes, I use get_maintainer.pl but usually with the --no-git-fallback since
> the --git-fallback option tends to be too noisy and people complain that
> are cc'ed on random patches just because they touched a file in the past.
> 
> IOW, there is no way to know only by looking at get_maintainer.pl output
> if Rusty has only made a lot of changes to that repo or if he acts as a

err.. I meant s/repo/directory

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-09  2:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 22:13 [RESEND PATCH] modpost: don't add a trailing wildcard for OF module aliases Javier Martinez Canillas
2015-12-08 23:11 ` Andrew Morton
2015-12-09  2:00   ` Javier Martinez Canillas
2015-12-09  2:02     ` Javier Martinez Canillas

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).