From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D009D5B15B for ; Sat, 13 Dec 2025 12:43:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA54510EA9B; Sat, 13 Dec 2025 12:41:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=treblig.org header.i=@treblig.org header.b="lMsD3OkW"; dkim-atps=neutral Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7748B10E265; Fri, 22 Nov 2024 02:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=Content-Type:MIME-Version:Message-ID:Subject:From:Date:From :Subject; bh=Aj9SBpljQ5PLe5gzkWkkssKdPp+/uDCnSdMDd/gwj9M=; b=lMsD3OkWYZuiHtJy K7AkeV9agEl1ouzl11U3JcfNE4UjMROpw//3Xgcx4sU1r0bbm5xhhJfuBJ7mxbulUKXwa522NO05G SOnUWPYGM0O3+JyG5f+15M4btaav9jBY/gQboyQZCTdaXbqiiGT7h8NqtNCRiwGbOx/iQrDQFWQO+ UumeDw1pGsvPBZ6JsDkxzN4TD5GtwCABorkPX396qVPywYmUAOlWWbUAdz3ojqbyIhJnVRspue2Sf K4lPcLmBWaa7srPdKtRvfrBY9FyPtGhgdHujwDBVCUvyWYK/q4prZwztGEpCVSmXljeVpt1rE6cl5 Isb+47z34n9f1aCEfg==; Received: from dg by mx.treblig.org with local (Exim 4.96) (envelope-from ) id 1tEJ03-001EfD-1u; Fri, 22 Nov 2024 02:02:23 +0000 Date: Fri, 22 Nov 2024 02:02:23 +0000 From: "Dr. David Alan Gilbert" To: kherbst@redhat.com, lyude@redhat.com, dakr@redhat.com Cc: airlied@gmail.com, simona@ffwll.ch, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nouveau: Remove unused functions Message-ID: References: <20241022003102.303052-1-linux@treblig.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20241022003102.303052-1-linux@treblig.org> X-Chocolate: 70 percent or better cocoa solids preferably X-Operating-System: Linux/6.1.0-21-amd64 (x86_64) X-Uptime: 02:02:04 up 197 days, 13:16, 1 user, load average: 0.00, 0.03, 0.00 User-Agent: Mutt/2.2.12 (2023-09-09) X-Mailman-Approved-At: Sat, 13 Dec 2025 12:40:46 +0000 X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" * linux@treblig.org (linux@treblig.org) wrote: > From: "Dr. David Alan Gilbert" > > dcb_outp_match() last use was removed in 2017 in > commit 99a845a30f62 ("drm/nouveau/disp/nv50-gt21x: remove workaround for > dp->tmds hotplug issues") > > dcb_xpio_parse was added in 2012 in > commit 112a12aab8a5 ("drm/nouveau/bios: add support for parsing xpio table > data") > but never used. > > Remove them. > > dcb_xpio_parse was the last user of struct nvbios_xpio, so remove it > as well and the FLAG #defines. > > Signed-off-by: Dr. David Alan Gilbert Ping. Thanks, Dave > --- > .../gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 2 -- > .../drm/nouveau/include/nvkm/subdev/bios/xpio.h | 12 ------------ > drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c | 14 -------------- > drivers/gpu/drm/nouveau/nvkm/subdev/bios/xpio.c | 13 ------------- > 4 files changed, 41 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h > index 73f9d9947e7e..12e6b2f21564 100644 > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h > @@ -61,8 +61,6 @@ u16 dcb_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *ent, u8 *len); > u16 dcb_outp(struct nvkm_bios *, u8 idx, u8 *ver, u8 *len); > u16 dcb_outp_parse(struct nvkm_bios *, u8 idx, u8 *, u8 *, > struct dcb_output *); > -u16 dcb_outp_match(struct nvkm_bios *, u16 type, u16 mask, u8 *, u8 *, > - struct dcb_output *); > int dcb_outp_foreach(struct nvkm_bios *, void *data, int (*exec) > (struct nvkm_bios *, void *, int index, u16 entry)); > #endif > diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h > index 11b4c4d27e5f..cd0ffebcb73a 100644 > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h > @@ -2,18 +2,6 @@ > #ifndef __NVBIOS_XPIO_H__ > #define __NVBIOS_XPIO_H__ > > -#define NVBIOS_XPIO_FLAG_AUX 0x10 > -#define NVBIOS_XPIO_FLAG_AUX0 0x00 > -#define NVBIOS_XPIO_FLAG_AUX1 0x10 > - > -struct nvbios_xpio { > - u8 type; > - u8 addr; > - u8 flags; > -}; > - > u16 dcb_xpio_table(struct nvkm_bios *, u8 idx, > u8 *ver, u8 *hdr, u8 *cnt, u8 *len); > -u16 dcb_xpio_parse(struct nvkm_bios *, u8 idx, > - u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_xpio *); > #endif > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c > index 8698f260b988..ae1faa63d68f 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/dcb.c > @@ -193,20 +193,6 @@ dcb_outp_parse(struct nvkm_bios *bios, u8 idx, u8 *ver, u8 *len, > return dcb; > } > > -u16 > -dcb_outp_match(struct nvkm_bios *bios, u16 type, u16 mask, > - u8 *ver, u8 *len, struct dcb_output *outp) > -{ > - u16 dcb, idx = 0; > - while ((dcb = dcb_outp_parse(bios, idx++, ver, len, outp))) { > - if ((dcb_outp_hasht(outp) & 0x00ff) == (type & 0x00ff)) { > - if ((dcb_outp_hashm(outp) & mask) == mask) > - break; > - } > - } > - return dcb; > -} > - > int > dcb_outp_foreach(struct nvkm_bios *bios, void *data, > int (*exec)(struct nvkm_bios *, void *, int, u16)) > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/xpio.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/xpio.c > index 250fc42d8608..a47393e90de9 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/xpio.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/xpio.c > @@ -59,16 +59,3 @@ dcb_xpio_table(struct nvkm_bios *bios, u8 idx, > } > return 0x0000; > } > - > -u16 > -dcb_xpio_parse(struct nvkm_bios *bios, u8 idx, > - u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_xpio *info) > -{ > - u16 data = dcb_xpio_table(bios, idx, ver, hdr, cnt, len); > - if (data && *len >= 6) { > - info->type = nvbios_rd08(bios, data + 0x04); > - info->addr = nvbios_rd08(bios, data + 0x05); > - info->flags = nvbios_rd08(bios, data + 0x06); > - } > - return 0x0000; > -} > -- > 2.47.0 > -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/