Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp43696iof; Wed, 8 Jun 2022 14:49:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhGmkG7IZBx4vmIpx3g7uY69izP5qpHy6I9L3nuXciT81fB9S/xKzW+mCZs/rxD6vi3jYK X-Received: by 2002:a05:6402:42d5:b0:433:1727:b31c with SMTP id i21-20020a05640242d500b004331727b31cmr4842990edc.9.1654724948052; Wed, 08 Jun 2022 14:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654724948; cv=none; d=google.com; s=arc-20160816; b=Fk+qVGNOxkvsvd54RXesgx5DuPwq7+3MPQ4cMHYZFIxHkCDGP9+OwbahI/cqIFz6el Qw5mkQPuQDcOFU6RBHlu+2Sz3yjmm1NiqswMscanfrMBrd0ZHGGTDQnB9fob2qR3UYpm DR1esK4eFmd8AS/Oh4aTdOzXqG+ywnVrtP3otymlVEiTH6VwcIhAIHfYnb6FDMcQAIRx fvJNT/62gucZ9wqekKiwgNvCu77ueKkD6vh9TCq/01jOsQI/HTVJOO9EJOUJHZteNdFP cjsEWP4H4VqxkiDeylUMnVLLJOEywGxPIwTupqAGc69U2B+rSQ3QUqwy/At+G2hFAAJd KIQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=clHxW3sgfzzmzoMvOGIzcMmgsX8xQLBmlm21w7Tbfi4=; b=B08amk9OifWbCPocuIPh+xmhsB90ryw+ST3t7G22mOgtYq6rcN7RtQk6B3Jtqyi7I2 JorTNVA3oTrg0J9Okg3vtGFa5RIZy9O/vRALx01V8Z2p6EnySykJuTxe7celF89l/I/s mVtvAbS+9+eiBcSjpvseKFMWJ+FxMGSUSRF6sSPULTwHkbK2eA0N4aeExaqcJifNtui+ Ok1VEH0nn/00JuaGSi7D10/Rh1yJE6bU9PnBm9kwpzcJ3wrYVI1Ct6CXZySmVt/ihbU+ l4+ZqMs9Y10WBKO2lcOG0b05cPchM1xtU4bsK6FFnM3Y6FgT/IKqZlldjJ7Oi1nDS+5E 0S0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YQ8cW5qT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a05640205c900b0042dcf5f5921si28403883edx.597.2022.06.08.14.48.43; Wed, 08 Jun 2022 14:49:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YQ8cW5qT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233768AbiFHUsr (ORCPT + 99 others); Wed, 8 Jun 2022 16:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233829AbiFHUsn (ORCPT ); Wed, 8 Jun 2022 16:48:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 05A69EC3D6 for ; Wed, 8 Jun 2022 13:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654721318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=clHxW3sgfzzmzoMvOGIzcMmgsX8xQLBmlm21w7Tbfi4=; b=YQ8cW5qT5UGXdUThhOeM3EHmGjuwjZZcrkQ6XLHMa0eln85VKlQP+5VotO1hIRrCqI37Vh S0FyTbbQeR16M2tPgMGgd8WtFmc4PyGxSDRzv9fi3zBcqajl3taws4q5kUmYQrrF5QXYIh 8oHpUSYkNAhPWtMFVCsszO4qDMAnIkE= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-530-WX-7R6BDMSuI8z11e0pyrQ-1; Wed, 08 Jun 2022 16:48:37 -0400 X-MC-Unique: WX-7R6BDMSuI8z11e0pyrQ-1 Received: by mail-qk1-f197.google.com with SMTP id bl27-20020a05620a1a9b00b0069994eeb30cso17537152qkb.11 for ; Wed, 08 Jun 2022 13:48:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:user-agent:mime-version :content-transfer-encoding; bh=clHxW3sgfzzmzoMvOGIzcMmgsX8xQLBmlm21w7Tbfi4=; b=7Upn0y+y55hLUIU+il8s48/TBMk+rw/Qe5Wh9v5v42/mK8l9TLlOBEr50D3sQ6NScx LQsEhbl46cvpUNLA9zJBYf3IK3xIwfgD8dcLNua1iRvSU8BIkQduuuF1isiLZTvHuLHi qBmJpr3RzwlIQl/yUmSC9m8czeCdA2AN3Mab/ugJxJA/6STKjZlxpCwIzVwn2ShliB1D Nz+GaypQ/nCTsiW9o/0dDXd9CuEZaCfOi6vae2c81I9IJYUcWl5+kJFYHdv2KSaNHy6y C0s5jhD0446JsNCHWCe/Bu7ldkRXxKRY8+qYYIsLGUICpCdXO91gIJv0b18JprFxt7Oi yXBA== X-Gm-Message-State: AOAM532Wb4MJ23ei2VV9OfrG2uwdEHwVZeEbhWqAsNTvvX5L5oRm0bdc LDJM92GXSmvd5/sAqu8kIqtYmLDOwfupaHq24r5xutCYr42ITW3IpEpC138RIUGX8r4c/CrRZyE TigegFtrVR+znWGQ/ZsQw0Ug2 X-Received: by 2002:a05:620a:1792:b0:6a6:c734:d983 with SMTP id ay18-20020a05620a179200b006a6c734d983mr10766260qkb.682.1654721316180; Wed, 08 Jun 2022 13:48:36 -0700 (PDT) X-Received: by 2002:a05:620a:1792:b0:6a6:c734:d983 with SMTP id ay18-20020a05620a179200b006a6c734d983mr10766244qkb.682.1654721315912; Wed, 08 Jun 2022 13:48:35 -0700 (PDT) Received: from [192.168.8.138] (static-71-184-137-158.bstnma.ftas.verizon.net. [71.184.137.158]) by smtp.gmail.com with ESMTPSA id de13-20020a05620a370d00b006a6d7c3a82esm4812257qkb.15.2022.06.08.13.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 13:48:35 -0700 (PDT) Message-ID: <8c6e570f5e65e4f5abebc136d40d567e9af4f940.camel@redhat.com> Subject: Re: [PATCH v2] drm/nouveau/bios: Rename prom_init() and friends functions From: Lyude Paul To: Michael Ellerman , Christophe Leroy , Ben Skeggs , Karol Herbst , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Wed, 08 Jun 2022 16:48:34 -0400 In-Reply-To: <8735ggeih2.fsf@mpe.ellerman.id.au> References: <7e0612b61511ec8030e3b2dcbfaa7751781c8b91.1647684507.git.christophe.leroy@csgroup.eu> <8735ggeih2.fsf@mpe.ellerman.id.au> Organization: Red Hat Inc. Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Whoops, it totally may have. Thank you for the reminder, I will double check and make sure this gets pushed today On Tue, 2022-06-07 at 23:00 +1000, Michael Ellerman wrote: > Lyude Paul writes: > > Reviewed-by: Lyude Paul > > > > Will push to drm-misc-next > > I don't see this patch in mainline or drm-misc-next, did it get lost? > > cheers > > > On Sat, 2022-03-19 at 11:27 +0100, Christophe Leroy wrote: > > > While working at fixing powerpc headers, I ended up with the > > > following error. > > > > > >         drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c:48:1: > > > error: > > > conflicting types for 'prom_init'; have 'void *(struct nvkm_bios *, > > > const > > > char *)' > > >         make[5]: *** [scripts/Makefile.build:288: > > > drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o] Error 1 > > > > > > powerpc and a few other architectures have a prom_init() global > > > function. > > > One day or another it will conflict with the one in shadowrom.c > > > > > > Those being static, they can easily be renamed. Do it. > > > > > > While at it, also rename the ops structure as 'nvbios_prom' instead of > > > 'nvbios_rom' in order to make it clear that it refers to the > > > NV_PROM device. > > > > > > Signed-off-by: Christophe Leroy > > > --- > > > v2: using nvbios_prom prefix instead of nvbios_rom. Changed structure > > > name > > > to keep things consistant. > > > > > >  drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h    |  2 +- > > >  drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c  |  2 +- > > >  .../gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c   | 14 +++++++------- > > >  3 files changed, 9 insertions(+), 9 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h > > > b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h > > > index fac1bff1311b..cfa8a0c356dd 100644 > > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h > > > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h > > > @@ -19,7 +19,7 @@ struct nvbios_source { > > >  int nvbios_extend(struct nvkm_bios *, u32 length); > > >  int nvbios_shadow(struct nvkm_bios *); > > >   > > > -extern const struct nvbios_source nvbios_rom; > > > +extern const struct nvbios_source nvbios_prom; > > >  extern const struct nvbios_source nvbios_ramin; > > >  extern const struct nvbios_source nvbios_acpi_fast; > > >  extern const struct nvbios_source nvbios_acpi_slow; > > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c > > > b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c > > > index 4b571cc6bc70..19188683c8fc 100644 > > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c > > > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c > > > @@ -171,7 +171,7 @@ nvbios_shadow(struct nvkm_bios *bios) > > >         struct shadow mthds[] = { > > >                 { 0, &nvbios_of }, > > >                 { 0, &nvbios_ramin }, > > > -               { 0, &nvbios_rom }, > > > +               { 0, &nvbios_prom }, > > >                 { 0, &nvbios_acpi_fast }, > > >                 { 4, &nvbios_acpi_slow }, > > >                 { 1, &nvbios_pcirom }, > > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c > > > b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c > > > index ffa4b395220a..39144ceb117b 100644 > > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c > > > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c > > > @@ -25,7 +25,7 @@ > > >  #include > > >   > > >  static u32 > > > -prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) > > > +nvbios_prom_read(void *data, u32 offset, u32 length, struct nvkm_bios > > > *bios) > > >  { > > >         struct nvkm_device *device = data; > > >         u32 i; > > > @@ -38,14 +38,14 @@ prom_read(void *data, u32 offset, u32 length, struct > > > nvkm_bios *bios) > > >  } > > >   > > >  static void > > > -prom_fini(void *data) > > > +nvbios_prom_fini(void *data) > > >  { > > >         struct nvkm_device *device = data; > > >         nvkm_pci_rom_shadow(device->pci, true); > > >  } > > >   > > >  static void * > > > -prom_init(struct nvkm_bios *bios, const char *name) > > > +nvbios_prom_init(struct nvkm_bios *bios, const char *name) > > >  { > > >         struct nvkm_device *device = bios->subdev.device; > > >         if (device->card_type == NV_40 && device->chipset >= 0x4c) > > > @@ -55,10 +55,10 @@ prom_init(struct nvkm_bios *bios, const char *name) > > >  } > > >   > > >  const struct nvbios_source > > > -nvbios_rom = { > > > +nvbios_prom = { > > >         .name = "PROM", > > > -       .init = prom_init, > > > -       .fini = prom_fini, > > > -       .read = prom_read, > > > +       .init = nvbios_prom_init, > > > +       .fini = nvbios_prom_fini, > > > +       .read = nvbios_prom_read, > > >         .rw = false, > > >  }; > > > > -- > > Cheers, > >  Lyude Paul (she/her) > >  Software Engineer at Red Hat > -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat