mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Lyude Paul <lyude@redhat.com>, Ben Skeggs <bskeggs@redhat.com>,
	Karol Herbst <kherbst@redhat.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/nouveau/bios: Rename prom_init() and friends functions
Date: Fri, 18 Mar 2022 10:55:20 +0100	[thread overview]
Message-ID: <9aebcbbf-aaba-f7e8-7397-18284e74ab0d@csgroup.eu> (raw)
In-Reply-To: <672043db-5290-293c-fde4-440989c78d09@csgroup.eu>

Hi Paul,

Le 05/03/2022 à 10:51, Christophe Leroy a écrit :
> 
> 
> Le 05/03/2022 à 08:38, Christophe Leroy a écrit :
>>
>>
>> Le 04/03/2022 à 21:24, Lyude Paul a écrit :
>>> This mostly looks good to me. Just one question (and one comment down 
>>> below
>>> that needs addressing). Is this with ppc32? (I ask because ppc64le 
>>> doesn't
>>> seem to hit this compilation error).
>>
>> That's with PPC64, see 
>> http://kisskb.ellerman.id.au/kisskb/branch/chleroy/head/252ba609bea83234d2e35841c19ae84c67b43ec7/ 
>>
>>
>> But that's not (yet) with the mainline tree. That's work I'm doing to 
>> cleanup our asm/asm-protoypes.h header.
>>
>> Since commit 4efca4ed05cb ("kbuild: modversions for EXPORT_SYMBOL() 
>> for asm") that file is dedicated to prototypes of functions defined in 
>> assembly. Therefore I'm trying to dispatch C functions prototypes in 
>> other headers. I wanted to move prom_init() prototype into asm/prom.h 
>> and then I hit the problem.
>>
>> In the beginning I was thinking about just changing the name of the 
>> function in powerpc, but as I see that M68K, MIPS and SPARC also have 
>> a prom_init() function, I thought it would be better to change the 
>> name in shadowrom.c to avoid any future conflict like the one I got 
>> while reworking the headers.
>>
>>
>>>> @@ -57,8 +57,8 @@ prom_init(struct nvkm_bios *bios, const char *name)
>>>>   const struct nvbios_source
>>>>   nvbios_rom = {
>>>>          .name = "PROM",
>>>> -       .init = prom_init,
>>>> -       .fini = prom_fini,
>>>> -       .read = prom_read,
>>>> +       .init = nvbios_rom_init,
>>>> +       .fini = nvbios_rom_fini,
>>>> +       .read = nvbios_rom_read,
>>>
>>> Seeing as the source name is prom, I think using the naming convention
>>> nvbios_prom_* would be better then nvbios_rom_*.
>>>
>>
>> Yes I wasn't sure about the best naming as the file name is 
>> shadowrom.c and not shadowprom.c.
>>
>> I will send v2 using nvbios_prom_* as a name.
> 
> While preparing v2 I remembered that in fact, I called the functions 
> nvbios_rom_* because the name of the nvbios_source struct is nvbios_rom, 
> so for me it made sense to use the name of the struct as a prefix for 
> the functions.
> 
> So I'm OK to change it to nvbios_prom_* but it looks less logical to me.
> 
> Please confirm you still prefer nvbios_prom as prefix to the function 
> names.
> 

Are you still expecting a v2 for this patch ?

As the name of the structure is nvbios_rom, do you really prefer the 
functions to be called nvbios_prom_* as you mentionned in your comment ?

In that case, do you also expect the structure name to be changed to 
nvbios_prom ?

Thanks
Christophe

  reply	other threads:[~2022-03-18  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 17:20 Christophe Leroy
2022-03-04 20:24 ` Lyude Paul
2022-03-05  7:38   ` Christophe Leroy
2022-03-05  9:51     ` Christophe Leroy
2022-03-18  9:55       ` Christophe Leroy [this message]
2022-03-18 18:10         ` Lyude Paul
2022-03-18 22:30           ` Ben Skeggs

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=9aebcbbf-aaba-f7e8-7397-18284e74ab0d@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kherbst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    /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®