linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] clang-format: Set IndentWrappedFunctionNames false
@ 2018-06-25 22:44 Jason Gunthorpe
  2018-06-26 15:05 ` Miguel Ojeda
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2018-06-25 22:44 UTC (permalink / raw)
  To: linux-kernel, Miguel Ojeda, Andrew Morton
  Cc: Randy Dunlap, Andy Whitcroft, Joe Perches, Jonathan Corbet

The true option causes this indenting for functions:

static struct something_very_very_long *
    function(void *arg)
{

While a quick survey suggests that the usual Linux fallback is the GNU
style:

static struct something_very_very_long *
function(void *arg)
{

Eg as seen in:

kernel/cpu.c
kernel/fork.c
etc

Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 .clang-format | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Resending outside the merge window with no change..

If there is no clear upstream path for this file (it has no
MAINTAINERS entry?) I could take it to Linus via the rdma.git tree, eg
as a 'collectively maintained' file.

Would prefer Miguel's Ack to do that though. Looks like Andrew Morton
took the original patch introducing the file?

Thanks,
Jason

diff --git a/.clang-format b/.clang-format
index faffc0d5af4eeb..1d5da22e0ba50c 100644
--- a/.clang-format
+++ b/.clang-format
@@ -382,7 +382,7 @@ IncludeIsMainRegex: '(Test)?$'
 IndentCaseLabels: false
 #IndentPPDirectives: None # Unknown to clang-format-5.0
 IndentWidth: 8
-IndentWrappedFunctionNames: true
+IndentWrappedFunctionNames: false
 JavaScriptQuotes: Leave
 JavaScriptWrapImports: true
 KeepEmptyLinesAtTheStartOfBlocks: false
-- 
2.17.0


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

* Re: [PATCH RESEND] clang-format: Set IndentWrappedFunctionNames false
  2018-06-25 22:44 [PATCH RESEND] clang-format: Set IndentWrappedFunctionNames false Jason Gunthorpe
@ 2018-06-26 15:05 ` Miguel Ojeda
  2018-06-26 19:33   ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Miguel Ojeda @ 2018-06-26 15:05 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-kernel, Andrew Morton, Randy Dunlap, Andy Whitcroft,
	Joe Perches, Jonathan Corbet

Hi,

On Tue, Jun 26, 2018 at 12:44 AM, Jason Gunthorpe <jgg@mellanox.com> wrote:
> The true option causes this indenting for functions:
>
> static struct something_very_very_long *
>     function(void *arg)
> {
>
> While a quick survey suggests that the usual Linux fallback is the GNU
> style:
>
> static struct something_very_very_long *
> function(void *arg)
> {
>
> Eg as seen in:
>
> kernel/cpu.c
> kernel/fork.c
> etc
>
> Acked-by: Joe Perches <joe@perches.com>
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
>  .clang-format | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Resending outside the merge window with no change..
>
> If there is no clear upstream path for this file (it has no
> MAINTAINERS entry?) I could take it to Linus via the rdma.git tree, eg

We can add an specific entry, yeah. Is there any policy for "general
files" (or some general/catch-all entry)?

> as a 'collectively maintained' file.

As you prefer -- I can also pick it up through auxdisplay; but I am
not sure if we should put it in any "unrelated" tree, though. (Since
the file will not probably receive many patches, I originally thought
that it would be picked up by Andrew or some other "general" tree
instead.)

>
> Would prefer Miguel's Ack to do that though. Looks like Andrew Morton
> took the original patch introducing the file?

Yep, I sent it to Andrew and he kindly picked it up. Probably he
didn't notice this one.

As for the patch:

Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>

Cheers,
Miguel

>
> Thanks,
> Jason
>
> diff --git a/.clang-format b/.clang-format
> index faffc0d5af4eeb..1d5da22e0ba50c 100644
> --- a/.clang-format
> +++ b/.clang-format
> @@ -382,7 +382,7 @@ IncludeIsMainRegex: '(Test)?$'
>  IndentCaseLabels: false
>  #IndentPPDirectives: None # Unknown to clang-format-5.0
>  IndentWidth: 8
> -IndentWrappedFunctionNames: true
> +IndentWrappedFunctionNames: false
>  JavaScriptQuotes: Leave
>  JavaScriptWrapImports: true
>  KeepEmptyLinesAtTheStartOfBlocks: false
> --
> 2.17.0
>

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

* Re: [PATCH RESEND] clang-format: Set IndentWrappedFunctionNames false
  2018-06-26 15:05 ` Miguel Ojeda
@ 2018-06-26 19:33   ` Jason Gunthorpe
  2018-06-27 14:07     ` Miguel Ojeda
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2018-06-26 19:33 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: linux-kernel, Andrew Morton, Randy Dunlap, Andy Whitcroft,
	Joe Perches, Jonathan Corbet

On Tue, Jun 26, 2018 at 05:05:40PM +0200, Miguel Ojeda wrote:
> Hi,
> 
> On Tue, Jun 26, 2018 at 12:44 AM, Jason Gunthorpe <jgg@mellanox.com> wrote:
> > The true option causes this indenting for functions:
> >
> > static struct something_very_very_long *
> >     function(void *arg)
> > {
> >
> > While a quick survey suggests that the usual Linux fallback is the GNU
> > style:
> >
> > static struct something_very_very_long *
> > function(void *arg)
> > {
> >
> > Eg as seen in:
> >
> > kernel/cpu.c
> > kernel/fork.c
> > etc
> >
> > Acked-by: Joe Perches <joe@perches.com>
> > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> >  .clang-format | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Resending outside the merge window with no change..
> >
> > If there is no clear upstream path for this file (it has no
> > MAINTAINERS entry?) I could take it to Linus via the rdma.git tree, eg
> 
> We can add an specific entry, yeah. Is there any policy for "general
> files" (or some general/catch-all entry)?
> 
> > as a 'collectively maintained' file.
> 
> As you prefer -- I can also pick it up through auxdisplay; but I am
> not sure if we should put it in any "unrelated" tree, though. (Since
> the file will not probably receive many patches, I originally thought
> that it would be picked up by Andrew or some other "general" tree
> instead.)

Well, I'd rather you take it as the owner of the file, honestly :)
Along with a MAINTAINERS update...

I also don't know too well what the policy is for these sorts of files
- other catch all files like kernel.h I run through rdma.git from time
to time, but that is in relation to patches that depend on them..

> > Would prefer Miguel's Ack to do that though. Looks like Andrew Morton
> > took the original patch introducing the file?
> 
> Yep, I sent it to Andrew and he kindly picked it up. Probably he
> didn't notice this one.
> 
> As for the patch:
> 
> Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>

Lets give Andrew some time, he is probably very busy. If it gets to
rc5 without it getting picked up one of us can grab it instead to help
out..

Thanks,
Jason

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

* Re: [PATCH RESEND] clang-format: Set IndentWrappedFunctionNames false
  2018-06-26 19:33   ` Jason Gunthorpe
@ 2018-06-27 14:07     ` Miguel Ojeda
  0 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2018-06-27 14:07 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-kernel, Andrew Morton, Randy Dunlap, Andy Whitcroft,
	Joe Perches, Jonathan Corbet

On Tue, Jun 26, 2018 at 9:33 PM, Jason Gunthorpe <jgg@mellanox.com> wrote:
> On Tue, Jun 26, 2018 at 05:05:40PM +0200, Miguel Ojeda wrote:
>> Hi,
>>
>> On Tue, Jun 26, 2018 at 12:44 AM, Jason Gunthorpe <jgg@mellanox.com> wrote:
>> > The true option causes this indenting for functions:
>> >
>> > static struct something_very_very_long *
>> >     function(void *arg)
>> > {
>> >
>> > While a quick survey suggests that the usual Linux fallback is the GNU
>> > style:
>> >
>> > static struct something_very_very_long *
>> > function(void *arg)
>> > {
>> >
>> > Eg as seen in:
>> >
>> > kernel/cpu.c
>> > kernel/fork.c
>> > etc
>> >
>> > Acked-by: Joe Perches <joe@perches.com>
>> > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
>> >  .clang-format | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > Resending outside the merge window with no change..
>> >
>> > If there is no clear upstream path for this file (it has no
>> > MAINTAINERS entry?) I could take it to Linus via the rdma.git tree, eg
>>
>> We can add an specific entry, yeah. Is there any policy for "general
>> files" (or some general/catch-all entry)?
>>
>> > as a 'collectively maintained' file.
>>
>> As you prefer -- I can also pick it up through auxdisplay; but I am
>> not sure if we should put it in any "unrelated" tree, though. (Since
>> the file will not probably receive many patches, I originally thought
>> that it would be picked up by Andrew or some other "general" tree
>> instead.)
>
> Well, I'd rather you take it as the owner of the file, honestly :)
> Along with a MAINTAINERS update...

OK -- I will send the MAINTAINERS update patch :)

>
> I also don't know too well what the policy is for these sorts of files
> - other catch all files like kernel.h I run through rdma.git from time
> to time, but that is in relation to patches that depend on them..
>
>> > Would prefer Miguel's Ack to do that though. Looks like Andrew Morton
>> > took the original patch introducing the file?
>>
>> Yep, I sent it to Andrew and he kindly picked it up. Probably he
>> didn't notice this one.
>>
>> As for the patch:
>>
>> Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
>
> Lets give Andrew some time, he is probably very busy. If it gets to
> rc5 without it getting picked up one of us can grab it instead to help
> out..

Sure! :)

(and thanks!)

Cheers,
Miguel

>
> Thanks,
> Jason

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

end of thread, other threads:[~2018-06-27 14:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 22:44 [PATCH RESEND] clang-format: Set IndentWrappedFunctionNames false Jason Gunthorpe
2018-06-26 15:05 ` Miguel Ojeda
2018-06-26 19:33   ` Jason Gunthorpe
2018-06-27 14:07     ` Miguel Ojeda

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