From nobody Tue Dec 16 07:32:59 2025 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC5301C2DB2 for ; Tue, 14 Jan 2025 16:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873660; cv=none; b=Dam07rWpz+BzYg6ft9IhMfejBKadmJil2IiUjQbP13UyZ9qTC0GoEsggEq/DwKWdjdbKE4CctqUszW1XmnOZrcw6LaphoCgZ5tEXaOQVAzESYGooQBHGedLPPI01gWDSkOf/R8RdUTwy+va4U7EPK0qocb2BEA+HOJXGjdvZPTI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873660; c=relaxed/simple; bh=gIFz1qslCXNFz5PpHh4jvvbQq0R5IsHSVaUxp2AQ9w8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nDtMrs9V+6dzEH1LBSOmAdEN6Qt6pkVZszTPdk+mtFfmQsxnp67Xk9U4pybh1i6BkgSLH3WrNr1vzFsJMidcpSZ1u+DaxSvH40eweHXdiG2Xcv43CdoBdbsmjnpchMwpLiHAGapRCLytIvBe/dM1DlAbkMlGo3OPzQKfRlAhXtI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UYUlxKl/; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UYUlxKl/" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-38637614567so2800753f8f.3 for ; Tue, 14 Jan 2025 08:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736873657; x=1737478457; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I/6EC8Pbzw7aJB5sG54VmdFYYMNN5qTwv2WxHgAtFp0=; b=UYUlxKl/9r0rN8h8yQj76fHW5fD+YQkovrA5veMKb/MRVsqDjRIz+MYLqTEWDDTubm es4zMjqIvHci6OXnhSA+UK5qyqhdKBLO8+899kfYDVx3MHeWtebC03qT05jp7MAWVs98 1JwL/nBFKHp0O1MRuOw7w6m8DqwMJXuDJLaZuxJff++vmaabt44Vz847kP4dxBhlOv0Y dqi9CE5NNvZIsJv58KKWqO+CW5FXscuVbTfxOy1B4Dj9TSfXyY576qCwe4k/DOSL9DIN R1/r5EiItZU614WTIcgJdA5L3Rqu+nc3huDIBS1G3CDjPW3njXja+jM8gfueueYVL6jO Cang== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736873657; x=1737478457; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I/6EC8Pbzw7aJB5sG54VmdFYYMNN5qTwv2WxHgAtFp0=; b=bzycIrkkAokNtrZqJ5TdMTTwphxa45LQzlxcRNVvAv4TAH1UJGxyilaNpgCDvOUCY1 FFRZkThpIiDbXxt38hP8679G8HA9Dcu7fp9yiPsbXWw1eOR2WeZhkIQ4hpIRZqPprCSN RtszOP5n+zCcAaqTOHUDbgATQX+cL3xjUepr4AOPKrFsg7SX2idHYkzafAQLfAJeIWx3 5W+kJjoseWRp3Yg+STB1DjcpD+pkAad5zvjCBUSPVqzoMV2MQoZD0GykX7p25SD5Bi2H H0JDS0BLREOx0H6Jwe3hmMrKw2lrNLOqsQRRAnRHteUZu15A2XQZ0X0501u0vux+yEfq R5+A== X-Forwarded-Encrypted: i=1; AJvYcCWSqXiTeuMCca7WU8ZbNxXce4MTR0IuHe+fJSdZkxnzyuG643bhql3/UZy4usqv5p14+IPmn6kpcdZGO+s=@vger.kernel.org X-Gm-Message-State: AOJu0YydAKqCcMdlMsx9HeYZMVyqmFkuVJOImGFqXM0qthnSFJBEV/kE 9QqFfMz+c1hfLsDuu0ok2J1grNuJjnZCjPFsTiVJWuJQqhFeXL4gLcLgIA== X-Gm-Gg: ASbGncuiamRJ2P+C8O1RdPlHfZorhqsJ4/02zPmODP8LH6ruf8zqJ3z5hFJWy6VbItF hh5NsplVfwYA2yLoG0KvLqHItCyuwGVWMuTJoAZFMsS9bfuRSMinEEejrY6B4hMP+JP+fZT7QH2 ZV1m54i/D4F3WuBrgqRqJSHz+Ai2R+G8kCHYZv3SXJpsB1VbsRKkb6fv+hDedRwwhJqa8Y2Hk9V qdMz13sYFA/OQyVp0J1XCRb6xU6v8b9OQUcgvGT+tXmbjUPTppuYwI1m9llX2rTjteU4LoBsiCM dER06RKfkLZhYaz+ X-Google-Smtp-Source: AGHT+IH5UikWqZxq6PoBApIIVMvesRGnZonJwFzQ0J2vDs5+3d3zLG/tksm1X8PANjugQ+T9E5MdcA== X-Received: by 2002:a05:6000:470d:b0:385:fd24:3303 with SMTP id ffacd0b85a97d-38a870821bbmr22628586f8f.0.1736873656927; Tue, 14 Jan 2025 08:54:16 -0800 (PST) Received: from localhost.localdomain (82-64-73-52.subs.proxad.net. [82.64.73.52]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9e03e5fsm179930495e9.18.2025.01.14.08.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 08:54:16 -0800 (PST) From: Dave Penkler To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Dave Penkler Subject: [PATCH 1/4] staging: gpib: Use __iomem attribute for io addresses Date: Tue, 14 Jan 2025 17:54:00 +0100 Message-ID: <20250114165403.16410-2-dpenkler@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250114165403.16410-1-dpenkler@gmail.com> References: <20250114165403.16410-1-dpenkler@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In a number of drivers the PCI memory pointers were declared simply as void *. This caused sparse to emit the following warning, for example: agilent_82350b/agilent_82350b.c:44:58: warning: incorrect type in argument = 2 (different address spaces) agilent_82350b/agilent_82350b.c:44:58: expected void volatile [noderef] = __iomem *addr Declare the PCI memory pointers as void __iomem *addr. Signed-off-by: Dave Penkler --- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 10 +++++----- drivers/staging/gpib/agilent_82350b/agilent_82350b.h | 10 +++++----- drivers/staging/gpib/eastwood/fluke_gpib.h | 2 +- drivers/staging/gpib/fmh_gpib/fmh_gpib.h | 2 +- drivers/staging/gpib/ines/ines_gpib.c | 4 ++-- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c b/drivers= /staging/gpib/agilent_82350b/agilent_82350b.c index 05490d1abc96..3f4f95b7fe34 100644 --- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c +++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c @@ -808,15 +808,15 @@ void agilent_82350b_detach(gpib_board_t *board) if (a_priv->gpib_base) { tms9914_board_reset(tms_priv); if (a_priv->misc_base) - iounmap((void *)a_priv->misc_base); + iounmap(a_priv->misc_base); if (a_priv->borg_base) - iounmap((void *)a_priv->borg_base); + iounmap(a_priv->borg_base); if (a_priv->sram_base) - iounmap((void *)a_priv->sram_base); + iounmap(a_priv->sram_base); if (a_priv->gpib_base) - iounmap((void *)a_priv->gpib_base); + iounmap(a_priv->gpib_base); if (a_priv->plx_base) - iounmap((void *)a_priv->plx_base); + iounmap(a_priv->plx_base); pci_release_regions(a_priv->pci_device); } if (a_priv->pci_device) diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.h b/drivers= /staging/gpib/agilent_82350b/agilent_82350b.h index 6915c1b2c85b..32b322113c10 100644 --- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.h +++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.h @@ -45,11 +45,11 @@ enum board_model { struct agilent_82350b_priv { struct tms9914_priv tms9914_priv; struct pci_dev *pci_device; - void *plx_base; //82350a only - void *gpib_base; - void *sram_base; - void *misc_base; - void *borg_base; + void __iomem *plx_base; //82350a only + void __iomem *gpib_base; + void __iomem *sram_base; + void __iomem *misc_base; + void __iomem *borg_base; int irq; unsigned short card_mode_bits; unsigned short event_status_bits; diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.h b/drivers/staging/g= pib/eastwood/fluke_gpib.h index 4e2144d45270..3e4348196b42 100644 --- a/drivers/staging/gpib/eastwood/fluke_gpib.h +++ b/drivers/staging/gpib/eastwood/fluke_gpib.h @@ -21,7 +21,7 @@ struct fluke_priv { struct dma_chan *dma_channel; u8 *dma_buffer; int dma_buffer_size; - void *write_transfer_counter; + void __iomem *write_transfer_counter; }; =20 // cb7210 specific registers and bits diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.h b/drivers/staging/gpi= b/fmh_gpib/fmh_gpib.h index 60b1bd6d3c15..de6fd2164414 100644 --- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.h +++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.h @@ -33,7 +33,7 @@ struct fmh_priv { u8 *dma_buffer; int dma_buffer_size; int dma_burst_length; - void *fifo_base; + void __iomem *fifo_base; unsigned supports_fifo_interrupts : 1; }; =20 diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/i= nes/ines_gpib.c index 0dbd3dc30721..2c970bab6545 100644 --- a/drivers/staging/gpib/ines/ines_gpib.c +++ b/drivers/staging/gpib/ines/ines_gpib.c @@ -1122,7 +1122,7 @@ static int ines_gpib_config(struct pcmcia_device *lin= k) { struct local_info *dev; int retval; - void *virt; + void __iomem *virt; =20 dev =3D link->priv; DEBUG(0, "%s(0x%p)\n", __func__, link); @@ -1156,7 +1156,7 @@ static int ines_gpib_config(struct pcmcia_device *lin= k) } virt =3D ioremap(link->resource[2]->start, resource_size(link->resource[2= ])); writeb((link->resource[2]->start >> 2) & 0xff, virt + 0xf0); // IOWindow = base - iounmap((void *)virt); + iounmap(virt); =20 /* * This actually configures the PCMCIA socket -- setting up diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/= gpib/tnt4882/tnt4882_gpib.c index 60369a5dfb72..2fd1a29f0c8b 100644 --- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c +++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c @@ -116,7 +116,7 @@ static inline void tnt_paged_writeb(struct tnt4882_priv= *priv, unsigned int valu /* readb/writeb wrappers */ static inline unsigned short tnt_readb(struct tnt4882_priv *priv, unsigned= long offset) { - void *address =3D priv->nec7210_priv.mmiobase + offset; + void __iomem *address =3D priv->nec7210_priv.mmiobase + offset; unsigned long flags; unsigned short retval; spinlock_t *register_lock =3D &priv->nec7210_priv.register_page_lock; @@ -154,7 +154,7 @@ static inline unsigned short tnt_readb(struct tnt4882_p= riv *priv, unsigned long =20 static inline void tnt_writeb(struct tnt4882_priv *priv, unsigned short va= lue, unsigned long offset) { - void *address =3D priv->nec7210_priv.mmiobase + offset; + void __iomem *address =3D priv->nec7210_priv.mmiobase + offset; unsigned long flags; spinlock_t *register_lock =3D &priv->nec7210_priv.register_page_lock; =20 --=20 2.47.1 From nobody Tue Dec 16 07:32:59 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FFD01E2309 for ; Tue, 14 Jan 2025 16:54:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873663; cv=none; b=JMY4l9F4mT1H8g8wbdlGWzLPxXW3Wwww+uSxA73Uc/4U01q2NtRml5MwRtf1yPgQ8QtifslLglKBQ1g831sfzH/G0ygInZ1XqaprSfmmmnT4DVKFd8I7RKUSdtED6Z1V+LG4HAZZOl6uJ9S3UT7/URQxCQtvEzYU5fqYTBTPtuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873663; c=relaxed/simple; bh=Be+bhLKy0crE6GQjdraRet5wldeI7lbH2MQYS0Ehcks=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SMKwnHxrujzrcP0pxcwItK711WbupH1R7+pk1uFXnRv7u5m/gOjZxuWTePhcBFW3Z5GYLSItM2uouxOkB74FOcF2b8Rn+AlI9/NsIhTNWuxHAuRZLmedkjPT3AClawmlfykgS6hcvPlcq2u1LCogsyFGkfUaMRVonPqe1hTshfA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hDKnxaF/; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hDKnxaF/" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43675b1155bso65419685e9.2 for ; Tue, 14 Jan 2025 08:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736873659; x=1737478459; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JJeBiGNKF3n1GikbnwHTwsdqGW+BvczoYjInXjW5HTE=; b=hDKnxaF/n4AiWLnKOqgfxo0OvxSDP5JvuBiCymMFmEcN5kBvRHXwK7S7sKwZt20cTC 3O2FYs9PRe7llF1mb0+3g1aG6oFySx4cMh8VMskQGkemmI9oaYb4mgHjubuKaA5LZk9Y GXC6Zjx2DBdGmZdyQwO2wQ4DGawoKx9t7NpuCvTUhMYV6N1C0cNLCkcLjsrbnYd2EDnF LqxIKSUrrTwut1P+5b061oBdc7ej1BZ4+1qkighgkFWwt3XCyrfpsVTGQ9BWz8dmp+tF U+S6K4KADqTyv5eIpi3WPVj6cBFAd7rDSmqjCzsz886/p9vSHw93t13mU0V3kZ9Izx54 bDtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736873659; x=1737478459; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JJeBiGNKF3n1GikbnwHTwsdqGW+BvczoYjInXjW5HTE=; b=kptmB9SeB8yEOAhSO8OQVbjhmGbjZoBV76R+uKqj7ynmb1O8XsB00z53uGa6GxGkfx C0SpRpkhBQNxTumks4dPrvdNEWzxqduNtp5YmewVM1RH5GTMFO7OEPykaeqNBsB7ebep weLO82iK9lRPK4JOZ8clt2xw8KoiOhalMc9+lg6SBobDR+bLiTEv+qCoyVdTH6tCeWb5 N5qeVR4c1mn8swkAmGTVIvMDKmbkbISe+PGxFGUCl5Iuu1BpG1yHvVzZiKycdMTXTY1Y Oya+TVvMzEL8HtkbANsSSqMzU0Ls5Z7BLkruooPor+MOqDPKC5Q6K6RuBNVv/1v+2eNm revw== X-Forwarded-Encrypted: i=1; AJvYcCWK+LaWSjgDFWdt9R8V3MAr9c9ER8WWTdSv95piKXi3Jz3JbDmT2u7X8K/07GH4WQfwddLTBagQdKbZno0=@vger.kernel.org X-Gm-Message-State: AOJu0YxZTFMO21VHeVhWzDDEobUT2mw7VJApRhXccMKaSILpZ/R0EyHg x02WvF4nZcBYG+EvMI6je4TnCE1R80bUfms8nKBNc34kwPWALEUf X-Gm-Gg: ASbGnctsukfYR5BvOzRWcxNmb0eukwYz65TXjj0l6etSPFsdDUeF3pWINcKcEgfXmno nmq73KVDcDyakXMK7LUGSlNL657yZzkip5K+YAvfX/o4zsIzySOIRQFaTE/iqi3NilZnkTk0ojq haXPThGe//gEsqOQ/w0LiKwu+V/m14NpJzUORJUGMMwmlVKwDAz3ctEQwY7dJnVoOFGiG27tCvF +dgrJNq5gz9ydyHmrCp3r6l7orL7eRHvuAeQOjxcqSc8gdpQ56V4c1AwHIf4KVxrHFspAQIsI4q PhQ8zmS3QsAh1tj7 X-Google-Smtp-Source: AGHT+IFdB9MqijzvMQ5AZN705AacNdKytLYsKY/BtzcJq/+83dVI1n8c+vx49QEbbVjA9ZpB/+dcOw== X-Received: by 2002:a05:6000:4617:b0:385:f220:f779 with SMTP id ffacd0b85a97d-38a873392e7mr21372723f8f.49.1736873659081; Tue, 14 Jan 2025 08:54:19 -0800 (PST) Received: from localhost.localdomain (82-64-73-52.subs.proxad.net. [82.64.73.52]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9e03e5fsm179930495e9.18.2025.01.14.08.54.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 08:54:18 -0800 (PST) From: Dave Penkler To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Dave Penkler Subject: [PATCH 2/4] staging: gpib: Use __user for user space pointers Date: Tue, 14 Jan 2025 17:54:01 +0100 Message-ID: <20250114165403.16410-3-dpenkler@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250114165403.16410-1-dpenkler@gmail.com> References: <20250114165403.16410-1-dpenkler@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The user buffers in copy_from_user, copy_to_user and some file ops did not use the __user address space attribute. This led to the following sparse warning, for example: common/gpib_os.c:838:40: warning: incorrect type in argument 2 (different a= ddress spaces) common/gpib_os.c:838:40: expected void const [noderef] __user *from common/gpib_os.c:838:40: got void * Add the __user address space attribute where needed. Signed-off-by: Dave Penkler --- drivers/staging/gpib/common/gpib_os.c | 103 +++++++++--------- .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 4 +- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/c= ommon/gpib_os.c index 982a2fe68cf2..69fe39aa0daf 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -835,7 +835,7 @@ static int board_type_ioctl(gpib_file_private_t *file_p= riv, gpib_board_t *board, return -EBUSY; } =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(board_type_ioctl_t)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(board_type_ioc= tl_t)); if (retval) return retval; =20 @@ -879,7 +879,7 @@ static int read_ioctl(gpib_file_private_t *file_priv, g= pib_board_t *board, unsigned long arg) { read_write_ioctl_t read_cmd; - u8 *userbuf; + u8 __user *userbuf; unsigned long remain; int end_flag =3D 0; int retval; @@ -887,7 +887,7 @@ static int read_ioctl(gpib_file_private_t *file_priv, g= pib_board_t *board, gpib_descriptor_t *desc; size_t nbytes; =20 - retval =3D copy_from_user(&read_cmd, (void *)arg, sizeof(read_cmd)); + retval =3D copy_from_user(&read_cmd, (void __user *)arg, sizeof(read_cmd)= ); if (retval) return -EFAULT; =20 @@ -901,7 +901,7 @@ static int read_ioctl(gpib_file_private_t *file_priv, g= pib_board_t *board, if (WARN_ON_ONCE(sizeof(userbuf) > sizeof(read_cmd.buffer_ptr))) return -EFAULT; =20 - userbuf =3D (u8 *)(unsigned long)read_cmd.buffer_ptr; + userbuf =3D (u8 __user *)(unsigned long)read_cmd.buffer_ptr; userbuf +=3D read_cmd.completed_transfer_count; =20 remain =3D read_cmd.requested_transfer_count - read_cmd.completed_transfe= r_count; @@ -939,7 +939,7 @@ static int read_ioctl(gpib_file_private_t *file_priv, g= pib_board_t *board, if (remain =3D=3D 0 || end_flag) read_ret =3D 0; if (retval =3D=3D 0) - retval =3D copy_to_user((void *)arg, &read_cmd, sizeof(read_cmd)); + retval =3D copy_to_user((void __user *)arg, &read_cmd, sizeof(read_cmd)); =20 atomic_set(&desc->io_in_progress, 0); =20 @@ -954,7 +954,7 @@ static int command_ioctl(gpib_file_private_t *file_priv, gpib_board_t *board, unsigned long arg) { read_write_ioctl_t cmd; - u8 *userbuf; + u8 __user *userbuf; unsigned long remain; int retval; int fault =3D 0; @@ -962,7 +962,7 @@ static int command_ioctl(gpib_file_private_t *file_priv, size_t bytes_written; int no_clear_io_in_prog; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -973,7 +973,7 @@ static int command_ioctl(gpib_file_private_t *file_priv, if (!desc) return -EINVAL; =20 - userbuf =3D (u8 *)(unsigned long)cmd.buffer_ptr; + userbuf =3D (u8 __user *)(unsigned long)cmd.buffer_ptr; userbuf +=3D cmd.completed_transfer_count; =20 no_clear_io_in_prog =3D cmd.end; @@ -1016,7 +1016,7 @@ static int command_ioctl(gpib_file_private_t *file_pr= iv, cmd.completed_transfer_count =3D cmd.requested_transfer_count - remain; =20 if (fault =3D=3D 0) - fault =3D copy_to_user((void *)arg, &cmd, sizeof(cmd)); + fault =3D copy_to_user((void __user *)arg, &cmd, sizeof(cmd)); =20 /* * no_clear_io_in_prog (cmd.end) is true when io_in_progress should @@ -1038,13 +1038,13 @@ static int write_ioctl(gpib_file_private_t *file_pr= iv, gpib_board_t *board, unsigned long arg) { read_write_ioctl_t write_cmd; - u8 *userbuf; + u8 __user *userbuf; unsigned long remain; int retval =3D 0; int fault; gpib_descriptor_t *desc; =20 - fault =3D copy_from_user(&write_cmd, (void *)arg, sizeof(write_cmd)); + fault =3D copy_from_user(&write_cmd, (void __user *)arg, sizeof(write_cmd= )); if (fault) return -EFAULT; =20 @@ -1055,7 +1055,7 @@ static int write_ioctl(gpib_file_private_t *file_priv= , gpib_board_t *board, if (!desc) return -EINVAL; =20 - userbuf =3D (u8 *)(unsigned long)write_cmd.buffer_ptr; + userbuf =3D (u8 __user *)(unsigned long)write_cmd.buffer_ptr; userbuf +=3D write_cmd.completed_transfer_count; =20 remain =3D write_cmd.requested_transfer_count - write_cmd.completed_trans= fer_count; @@ -1094,7 +1094,7 @@ static int write_ioctl(gpib_file_private_t *file_priv= , gpib_board_t *board, if (remain =3D=3D 0) retval =3D 0; if (fault =3D=3D 0) - fault =3D copy_to_user((void *)arg, &write_cmd, sizeof(write_cmd)); + fault =3D copy_to_user((void __user *)arg, &write_cmd, sizeof(write_cmd)= ); =20 atomic_set(&desc->io_in_progress, 0); =20 @@ -1111,7 +1111,7 @@ static int status_bytes_ioctl(gpib_board_t *board, un= signed long arg) spoll_bytes_ioctl_t cmd; int retval; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1121,7 +1121,7 @@ static int status_bytes_ioctl(gpib_board_t *board, un= signed long arg) else cmd.num_bytes =3D num_status_bytes(device); =20 - retval =3D copy_to_user((void *)arg, &cmd, sizeof(cmd)); + retval =3D copy_to_user((void __user *)arg, &cmd, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1231,7 +1231,7 @@ static int open_dev_ioctl(struct file *filep, gpib_bo= ard_t *board, unsigned long gpib_file_private_t *file_priv =3D filep->private_data; int i; =20 - retval =3D copy_from_user(&open_dev_cmd, (void *)arg, sizeof(open_dev_cmd= )); + retval =3D copy_from_user(&open_dev_cmd, (void __user *)arg, sizeof(open_= dev_cmd)); if (retval) return -EFAULT; =20 @@ -1267,7 +1267,7 @@ static int open_dev_ioctl(struct file *filep, gpib_bo= ard_t *board, unsigned long atomic_set(&board->stuck_srq, 0); =20 open_dev_cmd.handle =3D i; - retval =3D copy_to_user((void *)arg, &open_dev_cmd, sizeof(open_dev_cmd)); + retval =3D copy_to_user((void __user *)arg, &open_dev_cmd, sizeof(open_de= v_cmd)); if (retval) return -EFAULT; =20 @@ -1280,7 +1280,7 @@ static int close_dev_ioctl(struct file *filep, gpib_b= oard_t *board, unsigned lon gpib_file_private_t *file_priv =3D filep->private_data; int retval; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1308,7 +1308,7 @@ static int serial_poll_ioctl(gpib_board_t *board, uns= igned long arg) =20 dev_dbg(board->gpib_dev, "pid %i, entering %s()\n", current->pid, __func_= _); =20 - retval =3D copy_from_user(&serial_cmd, (void *)arg, sizeof(serial_cmd)); + retval =3D copy_from_user(&serial_cmd, (void __user *)arg, sizeof(serial_= cmd)); if (retval) return -EFAULT; =20 @@ -1317,7 +1317,7 @@ static int serial_poll_ioctl(gpib_board_t *board, uns= igned long arg) if (retval < 0) return retval; =20 - retval =3D copy_to_user((void *)arg, &serial_cmd, sizeof(serial_cmd)); + retval =3D copy_to_user((void __user *)arg, &serial_cmd, sizeof(serial_cm= d)); if (retval) return -EFAULT; =20 @@ -1331,7 +1331,7 @@ static int wait_ioctl(gpib_file_private_t *file_priv,= gpib_board_t *board, int retval; gpib_descriptor_t *desc; =20 - retval =3D copy_from_user(&wait_cmd, (void *)arg, sizeof(wait_cmd)); + retval =3D copy_from_user(&wait_cmd, (void __user *)arg, sizeof(wait_cmd)= ); if (retval) return -EFAULT; =20 @@ -1344,7 +1344,7 @@ static int wait_ioctl(gpib_file_private_t *file_priv,= gpib_board_t *board, if (retval < 0) return retval; =20 - retval =3D copy_to_user((void *)arg, &wait_cmd, sizeof(wait_cmd)); + retval =3D copy_to_user((void __user *)arg, &wait_cmd, sizeof(wait_cmd)); if (retval) return -EFAULT; =20 @@ -1360,7 +1360,7 @@ static int parallel_poll_ioctl(gpib_board_t *board, u= nsigned long arg) if (retval < 0) return retval; =20 - retval =3D copy_to_user((void *)arg, &poll_byte, sizeof(poll_byte)); + retval =3D copy_to_user((void __user *)arg, &poll_byte, sizeof(poll_byte)= ); if (retval) return -EFAULT; =20 @@ -1371,14 +1371,14 @@ static int online_ioctl(gpib_board_t *board, unsign= ed long arg) { online_ioctl_t online_cmd; int retval; - void *init_data =3D NULL; + void __user *init_data =3D NULL; =20 board->config.init_data =3D NULL; =20 if (!capable(CAP_SYS_ADMIN)) return -EPERM; =20 - retval =3D copy_from_user(&online_cmd, (void *)arg, sizeof(online_cmd)); + retval =3D copy_from_user(&online_cmd, (void __user *)arg, sizeof(online_= cmd)); if (retval) return -EFAULT; if (online_cmd.init_data_length > 0) { @@ -1387,7 +1387,7 @@ static int online_ioctl(gpib_board_t *board, unsigned= long arg) return -ENOMEM; if (WARN_ON_ONCE(sizeof(init_data) > sizeof(online_cmd.init_data_ptr))) return -EFAULT; - init_data =3D (void *)(unsigned long)(online_cmd.init_data_ptr); + init_data =3D (void __user *)(unsigned long)(online_cmd.init_data_ptr); retval =3D copy_from_user(board->config.init_data, init_data, online_cmd.init_data_length); if (retval) { @@ -1416,7 +1416,7 @@ static int remote_enable_ioctl(gpib_board_t *board, u= nsigned long arg) int enable; int retval; =20 - retval =3D copy_from_user(&enable, (void *)arg, sizeof(enable)); + retval =3D copy_from_user(&enable, (void __user *)arg, sizeof(enable)); if (retval) return -EFAULT; =20 @@ -1428,7 +1428,7 @@ static int take_control_ioctl(gpib_board_t *board, un= signed long arg) int synchronous; int retval; =20 - retval =3D copy_from_user(&synchronous, (void *)arg, sizeof(synchronous)); + retval =3D copy_from_user(&synchronous, (void __user *)arg, sizeof(synchr= onous)); if (retval) return -EFAULT; =20 @@ -1444,7 +1444,7 @@ static int line_status_ioctl(gpib_board_t *board, uns= igned long arg) if (retval < 0) return retval; =20 - retval =3D copy_to_user((void *)arg, &lines, sizeof(lines)); + retval =3D copy_to_user((void __user *)arg, &lines, sizeof(lines)); if (retval) return -EFAULT; =20 @@ -1458,7 +1458,7 @@ static int pad_ioctl(gpib_board_t *board, gpib_file_p= rivate_t *file_priv, int retval; gpib_descriptor_t *desc; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1494,7 +1494,7 @@ static int sad_ioctl(gpib_board_t *board, gpib_file_p= rivate_t *file_priv, int retval; gpib_descriptor_t *desc; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1527,7 +1527,7 @@ static int eos_ioctl(gpib_board_t *board, unsigned lo= ng arg) eos_ioctl_t eos_cmd; int retval; =20 - retval =3D copy_from_user(&eos_cmd, (void *)arg, sizeof(eos_cmd)); + retval =3D copy_from_user(&eos_cmd, (void __user *)arg, sizeof(eos_cmd)); if (retval) return -EFAULT; =20 @@ -1539,7 +1539,7 @@ static int request_service_ioctl(gpib_board_t *board,= unsigned long arg) u8 status_byte; int retval; =20 - retval =3D copy_from_user(&status_byte, (void *)arg, sizeof(status_byte)); + retval =3D copy_from_user(&status_byte, (void __user *)arg, sizeof(status= _byte)); if (retval) return -EFAULT; =20 @@ -1551,7 +1551,8 @@ static int request_service2_ioctl(gpib_board_t *board= , unsigned long arg) request_service2_t request_service2_cmd; int retval; =20 - retval =3D copy_from_user(&request_service2_cmd, (void *)arg, sizeof(requ= est_service2_t)); + retval =3D copy_from_user(&request_service2_cmd, (void __user *)arg, + sizeof(request_service2_t)); if (retval) return -EFAULT; =20 @@ -1567,7 +1568,7 @@ static int iobase_ioctl(gpib_board_config_t *config, = unsigned long arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; =20 - retval =3D copy_from_user(&base_addr, (void *)arg, sizeof(base_addr)); + retval =3D copy_from_user(&base_addr, (void __user *)arg, sizeof(base_add= r)); if (retval) return -EFAULT; =20 @@ -1586,7 +1587,7 @@ static int irq_ioctl(gpib_board_config_t *config, uns= igned long arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; =20 - retval =3D copy_from_user(&irq, (void *)arg, sizeof(irq)); + retval =3D copy_from_user(&irq, (void __user *)arg, sizeof(irq)); if (retval) return -EFAULT; =20 @@ -1603,7 +1604,7 @@ static int dma_ioctl(gpib_board_config_t *config, uns= igned long arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; =20 - retval =3D copy_from_user(&dma_channel, (void *)arg, sizeof(dma_channel)); + retval =3D copy_from_user(&dma_channel, (void __user *)arg, sizeof(dma_ch= annel)); if (retval) return -EFAULT; =20 @@ -1619,7 +1620,7 @@ static int autospoll_ioctl(gpib_board_t *board, gpib_= file_private_t *file_priv, int retval; gpib_descriptor_t *desc; =20 - retval =3D copy_from_user(&enable, (void *)arg, sizeof(enable)); + retval =3D copy_from_user(&enable, (void __user *)arg, sizeof(enable)); if (retval) return -EFAULT; =20 @@ -1654,7 +1655,7 @@ static int mutex_ioctl(gpib_board_t *board, gpib_file= _private_t *file_priv, { int retval, lock_mutex; =20 - retval =3D copy_from_user(&lock_mutex, (void *)arg, sizeof(lock_mutex)); + retval =3D copy_from_user(&lock_mutex, (void __user *)arg, sizeof(lock_mu= tex)); if (retval) return -EFAULT; =20 @@ -1698,7 +1699,7 @@ static int timeout_ioctl(gpib_board_t *board, unsigne= d long arg) unsigned int timeout; int retval; =20 - retval =3D copy_from_user(&timeout, (void *)arg, sizeof(timeout)); + retval =3D copy_from_user(&timeout, (void __user *)arg, sizeof(timeout)); if (retval) return -EFAULT; =20 @@ -1713,7 +1714,7 @@ static int ppc_ioctl(gpib_board_t *board, unsigned lo= ng arg) ppoll_config_ioctl_t cmd; int retval; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1739,7 +1740,7 @@ static int set_local_ppoll_mode_ioctl(gpib_board_t *b= oard, unsigned long arg) local_ppoll_mode_ioctl_t cmd; int retval; =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1759,7 +1760,7 @@ static int get_local_ppoll_mode_ioctl(gpib_board_t *b= oard, unsigned long arg) int retval; =20 cmd =3D board->local_ppoll_mode; - retval =3D copy_to_user((void *)arg, &cmd, sizeof(cmd)); + retval =3D copy_to_user((void __user *)arg, &cmd, sizeof(cmd)); if (retval) return -EFAULT; =20 @@ -1773,7 +1774,7 @@ static int query_board_rsv_ioctl(gpib_board_t *board,= unsigned long arg) =20 status =3D board->interface->serial_poll_status(board); =20 - retval =3D copy_to_user((void *)arg, &status, sizeof(status)); + retval =3D copy_to_user((void __user *)arg, &status, sizeof(status)); if (retval) return -EFAULT; =20 @@ -1796,7 +1797,7 @@ static int board_info_ioctl(const gpib_board_t *board= , unsigned long arg) info.t1_delay =3D board->t1_nano_sec; info.ist =3D board->ist; info.no_7_bit_eos =3D board->interface->no_7_bit_eos; - retval =3D copy_to_user((void *)arg, &info, sizeof(info)); + retval =3D copy_to_user((void __user *)arg, &info, sizeof(info)); if (retval) return -EFAULT; =20 @@ -1808,7 +1809,7 @@ static int interface_clear_ioctl(gpib_board_t *board,= unsigned long arg) unsigned int usec_duration; int retval; =20 - retval =3D copy_from_user(&usec_duration, (void *)arg, sizeof(usec_durati= on)); + retval =3D copy_from_user(&usec_duration, (void __user *)arg, sizeof(usec= _duration)); if (retval) return -EFAULT; =20 @@ -1823,7 +1824,7 @@ static int select_pci_ioctl(gpib_board_config_t *conf= ig, unsigned long arg) if (!capable(CAP_SYS_ADMIN)) return -EPERM; =20 - retval =3D copy_from_user(&selection, (void *)arg, sizeof(selection)); + retval =3D copy_from_user(&selection, (void __user *)arg, sizeof(selectio= n)); if (retval) return -EFAULT; =20 @@ -1845,7 +1846,7 @@ static int select_device_path_ioctl(gpib_board_config= _t *config, unsigned long a if (!selection) return -ENOMEM; =20 - retval =3D copy_from_user(selection, (void *)arg, sizeof(select_device_pa= th_ioctl_t)); + retval =3D copy_from_user(selection, (void __user *)arg, sizeof(select_de= vice_path_ioctl_t)); if (retval) { vfree(selection); return -EFAULT; @@ -1979,7 +1980,7 @@ static int event_ioctl(gpib_board_t *board, unsigned = long arg) =20 user_event =3D event; =20 - retval =3D copy_to_user((void *)arg, &user_event, sizeof(user_event)); + retval =3D copy_to_user((void __user *)arg, &user_event, sizeof(user_even= t)); if (retval) return -EFAULT; =20 @@ -1991,7 +1992,7 @@ static int request_system_control_ioctl(gpib_board_t = *board, unsigned long arg) rsc_ioctl_t request_control; int retval; =20 - retval =3D copy_from_user(&request_control, (void *)arg, sizeof(request_c= ontrol)); + retval =3D copy_from_user(&request_control, (void __user *)arg, sizeof(re= quest_control)); if (retval) return -EFAULT; =20 @@ -2011,7 +2012,7 @@ static int t1_delay_ioctl(gpib_board_t *board, unsign= ed long arg) return -EIO; } =20 - retval =3D copy_from_user(&cmd, (void *)arg, sizeof(cmd)); + retval =3D copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); if (retval) return -EFAULT; =20 diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/s= taging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c index b0bde6c3458c..85322af62c23 100644 --- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c +++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c @@ -1880,7 +1880,7 @@ static int skel_release(struct inode *inode, struct f= ile *file) * user space access to read function */ =20 -static ssize_t skel_read(struct file *file, char *buffer, size_t count, +static ssize_t skel_read(struct file *file, char __user *buffer, size_t co= unt, loff_t *ppos) { struct usb_skel *dev; @@ -1911,7 +1911,7 @@ static ssize_t skel_read(struct file *file, char *buf= fer, size_t count, * user space access to write function */ =20 -static ssize_t skel_write(struct file *file, const char *user_buffer, +static ssize_t skel_write(struct file *file, const char __user *user_buffe= r, size_t count, loff_t *ppos) { struct usb_skel *dev; --=20 2.47.1 From nobody Tue Dec 16 07:32:59 2025 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 988C61F9F66 for ; Tue, 14 Jan 2025 16:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873665; cv=none; b=u93GlXHfCSqNyrE70NlZmqKlXcnmKfCtweuu7i5CFctdyJPWN1CBgntJLJIW9FxcbR6utdM+mn9xG8jaDNb6nfQHYrA6X9QVjCKChyt0Ccrsd6O70PSDm+rcriKT0QTdesAIC+ZvlS70F+BBeOOprhrb4LBkPb706wKnKUu0VXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873665; c=relaxed/simple; bh=iTaMM5Gc8cE/zFss0CIcXQ2NJCA+B3AaPq4iH2muYEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LBCIUwhIqcgH5U/ULWleqDj5rnHRSs/Ce2URkfi5zwVki/9WSSchNFKT1HbXXNTNWTe2HGO1dAdHarT384Sw96Wf/r3dn1ezbtQbZbrX4jCvKkf5/9LmZnJGyrTXzCNs0G2s9oJeH8RYXbfa/UYo5eHnT5DTOYlYxTeti3eFDIo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bcVx0M3i; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bcVx0M3i" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43622267b2eso59785365e9.0 for ; Tue, 14 Jan 2025 08:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736873662; x=1737478462; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lCkJII/Z289jBCVlF0/SpypHP9K98YDfC6qDaxWRNJ0=; b=bcVx0M3iPNwqKoWfHiAocseyuJ36XL7QdrBXErN8yHOA4x36K0+2BnJ4RRbHgfBtGm uOT5PGAoTI/+xMCZF/67ce9i36fm/Bg18eKCQurzDGDOltbW6G2FM1rhsmTuoK0HlswO VGe6UuVD3vl5uITDS5MPsrFA7qx3A4yRM8gV5RW3aKJvI2XHNjSTxFe5pIw7rJyNbHeF UnbpEJ5hNFhN7UR5BXnPF9YFqNXfwKfpFfjg7YQXrGhCayJBc6Val2IODS52oQAnXk7w xmEuOUuRS9TCxG2yzSKwDMa+x3zoOaGPzMIkyfd/K6VhO4ssTg3+mokck4vCNcJ42WjQ UyTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736873662; x=1737478462; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lCkJII/Z289jBCVlF0/SpypHP9K98YDfC6qDaxWRNJ0=; b=QTHlBznfGB9TRWPxNGnKLC0Wiq8kyKkoyfiW/4FYW11SWBCB3VAMKhzF1fMYBAFHnX HoGik7Vy2u82OAntnIj/peFpmnufrwlvHhKUL/s0sMV/sXBHPRyfim/dbwJ/arGe7Zs2 foOu/j8tVUoZCUnr7jX6s47OayosjhjBog2U9L2pgZm3/x2FwNrH4oKgLOkHHNeIx1uh 0wB3PADIyNGVwXqf5otH9fTO3GAe8CJ3GKP8tttyS+smbjpNABb1K/we4dyBDBJm/7cC gboxA4i0yyjPzAoNV2vfFyhctddmusRCYbmbkppn215CEAyNkT8mIJahcLNniXnYWQYa gRfA== X-Forwarded-Encrypted: i=1; AJvYcCXkr/KmbaONEB24T8W+9DT5mhcTq6DjLHI+lOkAW5FwZTZAD3j3elyHBoR3O9Fl84QNSmYc+H5U6cgsULA=@vger.kernel.org X-Gm-Message-State: AOJu0YwIZASyw6nIZOScpAMlr8A526htQhhexIogc/PE/1obV+MBnbkA gm3U91hsRbBBVy7XFLb7cpJ2rNeCHRAG9PKz3xhAGrUl2Ytlax/WUMRZDQ== X-Gm-Gg: ASbGncsaC5yzS+LK5fr0jxTVDTIiZ7MeaVgATqFCbJyUDkBwy4J/dNOcwIFhmW8C3k5 nJqq4G3cvXUR31LD8z9vSf/k/NI7vsOlGKIJs1aSdED1A3brNF/knqKwGlEtLDNw/XKjtfrS3fz O23MABG0nKs65RcAVfbbCLazqykdLbVAOTLLM9dgHHjNwcmjR9PXTlPR78aRgrowh/nzov4W4AZ pAWYlHXuQJQmNswePs8j6IVelcYSz4d2dUCp7I5cuJY6XmN4LOb3UnDy8yLywFZl+DA0LZdIgI7 ULAaXpv7ZOoyBv98 X-Google-Smtp-Source: AGHT+IHQbdBUM78ZysVC9e7i/BdRe1dhw6JCoJrcjqgUJphKlfigT3PjpUKIMKwbKf6DskHjqtxRXA== X-Received: by 2002:a05:600c:444d:b0:434:f739:7ce2 with SMTP id 5b1f17b1804b1-436eedef4e5mr157077725e9.8.1736873661537; Tue, 14 Jan 2025 08:54:21 -0800 (PST) Received: from localhost.localdomain (82-64-73-52.subs.proxad.net. [82.64.73.52]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9e03e5fsm179930495e9.18.2025.01.14.08.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 08:54:20 -0800 (PST) From: Dave Penkler To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Dave Penkler Subject: [PATCH 3/4] staging: gpib: Avoid plain integers as NULL pointers Date: Tue, 14 Jan 2025 17:54:02 +0100 Message-ID: <20250114165403.16410-4-dpenkler@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250114165403.16410-1-dpenkler@gmail.com> References: <20250114165403.16410-1-dpenkler@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A number of drivers were comparing request_region() with 0, others were passing 0 instead of NULL as a pointer argument. This led to the following sparse warning, for example: cb7210/cb7210.c:1043:72: warning: Using plain integer as NULL pointer Use !request_region() to test for NULL return and use NULL instead of 0 as pointer parameter. Signed-off-by: Dave Penkler --- drivers/staging/gpib/cb7210/cb7210.c | 6 +++--- drivers/staging/gpib/common/gpib_os.c | 2 +- drivers/staging/gpib/common/iblib.c | 2 +- drivers/staging/gpib/gpio/gpib_bitbang.c | 4 ++-- drivers/staging/gpib/ines/ines_gpib.c | 4 ++-- drivers/staging/gpib/pc2/pc2_gpib.c | 2 +- drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb= 7210/cb7210.c index e5436f55c630..ae373005389b 100644 --- a/drivers/staging/gpib/cb7210/cb7210.c +++ b/drivers/staging/gpib/cb7210/cb7210.c @@ -1040,7 +1040,7 @@ int cb_isa_attach(gpib_board_t *board, const gpib_boa= rd_config_t *config) return retval; cb_priv =3D board->private_data; nec_priv =3D &cb_priv->nec7210_priv; - if (request_region(config->ibbase, cb7210_iosize, "cb7210") =3D=3D 0) { + if (!request_region(config->ibbase, cb7210_iosize, "cb7210")) { pr_err("gpib: ioports starting at 0x%u are already in use\n", config->ib= base); return -EIO; } @@ -1459,8 +1459,8 @@ int cb_pcmcia_attach(gpib_board_t *board, const gpib_= board_config_t *config) cb_priv =3D board->private_data; nec_priv =3D &cb_priv->nec7210_priv; =20 - if (request_region(curr_dev->resource[0]->start, resource_size(curr_dev->= resource[0]), - "cb7210") =3D=3D 0) { + if (!request_region(curr_dev->resource[0]->start, resource_size(curr_dev-= >resource[0]), + "cb7210")) { pr_err("gpib: ioports starting at 0x%lx are already in use\n", (unsigned long)curr_dev->resource[0]->start); return -EIO; diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/c= ommon/gpib_os.c index 69fe39aa0daf..3234d4348957 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -2197,7 +2197,7 @@ static int __init gpib_common_init_module(void) return PTR_ERR(gpib_class); } for (i =3D 0; i < GPIB_MAX_NUM_BOARDS; ++i) - board_array[i].gpib_dev =3D device_create(gpib_class, 0, + board_array[i].gpib_dev =3D device_create(gpib_class, NULL, MKDEV(GPIB_CODE, i), NULL, "gpib%i", i); =20 return 0; diff --git a/drivers/staging/gpib/common/iblib.c b/drivers/staging/gpib/com= mon/iblib.c index db1911cc1b26..5f6fa135f505 100644 --- a/drivers/staging/gpib/common/iblib.c +++ b/drivers/staging/gpib/common/iblib.c @@ -695,7 +695,7 @@ int ibwait(gpib_board_t *board, int wait_mask, int clea= r_mask, int set_mask, =20 /* make sure we only clear status bits that we are reporting */ if (*status & clear_mask || set_mask) - general_ibstatus(board, status_queue, *status & clear_mask, set_mask, 0); + general_ibstatus(board, status_queue, *status & clear_mask, set_mask, NU= LL); =20 return 0; } diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpi= b/gpio/gpib_bitbang.c index ad49a5644ab8..16e2d0c5642e 100644 --- a/drivers/staging/gpib/gpio/gpib_bitbang.c +++ b/drivers/staging/gpib/gpio/gpib_bitbang.c @@ -265,7 +265,7 @@ static struct gpiod_lookup_table gpib_gpio_table_0 =3D { static struct gpiod_lookup_table *lookup_tables[] =3D { &gpib_gpio_table_0, &gpib_gpio_table_1, - 0 + NULL }; =20 /* struct which defines private_data for gpio driver */ @@ -1119,7 +1119,7 @@ static void release_gpios(void) for (j =3D 0 ; j < NUM_PINS ; j++) { if (all_descriptors[j]) { gpiod_put(all_descriptors[j]); - all_descriptors[j] =3D 0; + all_descriptors[j] =3D NULL; } } } diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/i= nes/ines_gpib.c index 2c970bab6545..846dafc85c11 100644 --- a/drivers/staging/gpib/ines/ines_gpib.c +++ b/drivers/staging/gpib/ines/ines_gpib.c @@ -1342,8 +1342,8 @@ int ines_common_pcmcia_attach(gpib_board_t *board) ines_priv =3D board->private_data; nec_priv =3D &ines_priv->nec7210_priv; =20 - if (request_region(curr_dev->resource[0]->start, - resource_size(curr_dev->resource[0]), "ines_gpib") =3D=3D 0) { + if (!request_region(curr_dev->resource[0]->start, + resource_size(curr_dev->resource[0]), "ines_gpib")) { pr_err("ines_gpib: ioports at 0x%lx already in use\n", (unsigned long)(curr_dev->resource[0]->start)); return -1; diff --git a/drivers/staging/gpib/pc2/pc2_gpib.c b/drivers/staging/gpib/pc2= /pc2_gpib.c index 2fb2b51fbb0f..c0b07cb63d9a 100644 --- a/drivers/staging/gpib/pc2/pc2_gpib.c +++ b/drivers/staging/gpib/pc2/pc2_gpib.c @@ -426,7 +426,7 @@ int pc2_attach(gpib_board_t *board, const gpib_board_co= nfig_t *config) nec_priv =3D &pc2_priv->nec7210_priv; nec_priv->offset =3D pc2_reg_offset; =20 - if (request_region(config->ibbase, pc2_iosize, "pc2") =3D=3D 0) { + if (!request_region(config->ibbase, pc2_iosize, "pc2")) { pr_err("gpib: ioports are already in use\n"); return -1; } diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/= gpib/tnt4882/tnt4882_gpib.c index 2fd1a29f0c8b..b39ab2abe495 100644 --- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c +++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c @@ -1896,8 +1896,8 @@ int ni_pcmcia_attach(gpib_board_t *board, const gpib_= board_config_t *config) nec_priv->offset =3D atgpib_reg_offset; =20 DEBUG(0, "ioport1 window attributes: 0x%lx\n", curr_dev->resource[0]->fla= gs); - if (request_region(curr_dev->resource[0]->start, resource_size(curr_dev->= resource[0]), - "tnt4882") =3D=3D 0) { + if (!request_region(curr_dev->resource[0]->start, resource_size(curr_dev-= >resource[0]), + "tnt4882")) { pr_err("gpib: ioports starting at 0x%lx are already in use\n", (unsigned long)curr_dev->resource[0]->start); return -EIO; --=20 2.47.1 From nobody Tue Dec 16 07:32:59 2025 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11B5F1C2DB2 for ; Tue, 14 Jan 2025 16:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873667; cv=none; b=WlcKL9recitZANo1Tm8WjIUi6qEgE+IXeBjyACpmMcrdQsxMSUhMCm8TNPV10Y+GrFkAskRGcphBiygH/odxcvzHR+qfQmQcUM/2ktPPU2W0p8mxQJf6F0uIqZyUdG3hv2+3xSAZwB+ttHhuYncM37BqOiDPvRzTH7nkBGFpP5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736873667; c=relaxed/simple; bh=fv7VV+yGDdcKNZq/NRuMFgzCIGDrl6Myef6TMgc5mC8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mRyi7MipiaCKY0pYjzY4emELQEWK+Yho3m8n/PlhGVLTfudwf8GQcnT+4g/ioY2jpSzy0XIjOBCPcypVU6/8tLDarIvgLGE7PQKbyJJcLODmE+7S47IMz1CrDu7Cm+Y+1ssYTx4a/ciwDZwCIl6E1ozJtIc1ugfPw7tceLDt1UQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MCvB+d0L; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MCvB+d0L" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-436637e8c8dso59498975e9.1 for ; Tue, 14 Jan 2025 08:54:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736873663; x=1737478463; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iKxtdUb/cXgrIfHVWWlkiuhy6A7in5OGActCzYSUH9o=; b=MCvB+d0LQAK5T6H6gYr606MJaHEt0OVBSBfRWRYnGEr5P0hLcX5Ys5swuqMIndCqe0 2Hv12/mQ2rVNUksVnNLrGdmeRjcue3gsL5V+fokUR6YumikPzZOpM/lgokU38eXGy8gW KRmvTthG9cLZDMkYUY1sX6C/2huvNgdUWVEIojtlI1ehBX42Y064m4/7CjENP6pCJogy eofyjXUwsgeIgNIjKcAqSlSRtOgzJ3LSdCA3S0kq5ep4U+ibkCQteeQLqhoGcmf/lXbE l9qJXG6o4fZ4Szu83V1FBkPAKQdoYC/T2VYt+diGw/1og/2ud78m5pUgb9hcVW4ABkVN cGSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736873663; x=1737478463; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iKxtdUb/cXgrIfHVWWlkiuhy6A7in5OGActCzYSUH9o=; b=GeWyfySreI2kVr/bxijWJ3wza/NkH9DUaV72cg3qpHvvQ2rqUij/K2RezNHCcX7cQq dv8cL5XiuyaboYpNKRRSggc3EAsoAhQJ+BkeswkrY88PuF2eDB9lST3Up5Jq2Swg+6+0 Q4cZ1XBnT70Ve3UY9lov7rQNXU66AH07zLwlLnGRnyQshxCoLO9wp+aRd/jfOSZE16Es MALLnvMQyMtkvArFOHaQV2HexJ3FQzgnio1jCVuyRTnwgePuOsgjtwB7DqCw9viJmYKe ZCQAnheFINfcNNjUlocLoHPw7RvBvWoo4qPe7E/oUkEbemwdvJ0mP3Z322p4ZqyPvWGM RI0w== X-Forwarded-Encrypted: i=1; AJvYcCXT9GQn8M/WSyTkQAukk/d2KBoalnxLxE3ck7ijTeBeGjsesLeZEn1IxO5he0GEkgro+SyDY1VcBioXbBo=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0UZEWM1p2V5i6/ownUvR+CU4Fq8JfevZjsPzgBurplacnIBuv 1jBLHuOE+7lwNE+N61jt+hDX77USxqxqLpscNXpGZCS+G4lTliEj X-Gm-Gg: ASbGncu54gicmuFjkbBaMemuozhX5F/XN2QbqftHIBYwdMoai61z655WgAXtxsfUSoT A6Ll24rcFp818k72SeoR/72iuzHcnl6EWol+ieZ4gMNIo3wfh/7aOrGwjPlMaWFFoZeaO3BwBda Atw08OeduuD1ZAEGIWbUazMjT50F064fH7U4VYbcUD8XtgpSmW69JW1yfBz6z8MtgExWuUfVJ70 ksT3CAjgKj0ADfkWpxRY0VmhfOCroE8fedZLsaCSRX3mvNTTGK4j6evI1Gpov8wWBAkDyRrsUh7 aFkViJkll3B+quQR X-Google-Smtp-Source: AGHT+IHNNlWwCNRkFj3/gobGekOr/p7PqVWwRud7phxrhkbmHshASpA/cVN4a670kMbSs+kQSHQqcw== X-Received: by 2002:a05:600c:3c94:b0:434:fd15:3ac9 with SMTP id 5b1f17b1804b1-436e26e2563mr205625445e9.22.1736873663355; Tue, 14 Jan 2025 08:54:23 -0800 (PST) Received: from localhost.localdomain (82-64-73-52.subs.proxad.net. [82.64.73.52]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9e03e5fsm179930495e9.18.2025.01.14.08.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 08:54:22 -0800 (PST) From: Dave Penkler To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Dave Penkler Subject: [PATCH 4/4] staging: gpib: Use C99 syntax and make static Date: Tue, 14 Jan 2025 17:54:03 +0100 Message-ID: <20250114165403.16410-5-dpenkler@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250114165403.16410-1-dpenkler@gmail.com> References: <20250114165403.16410-1-dpenkler@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some drivers were still using the old syntax for initializing structs: field : value; This caused sparse to emit the following warning, for example: common/gpib_os.c:2026:1: warning: obsolete struct initializer, use C99 synt= ax Use C99 syntax: .field =3D value; Some local structs and arrays were not declared static causing sparse to emit the following warning, for example: warning: symbol 'ib_fops' was not declared. Should it be static? Declare the local structs and arrays as static. Signed-off-by: Dave Penkler --- .../gpib/agilent_82357a/agilent_82357a.c | 2 +- drivers/staging/gpib/common/gpib_os.c | 14 ++--- drivers/staging/gpib/gpio/gpib_bitbang.c | 4 +- drivers/staging/gpib/ines/ines_gpib.c | 58 +++++++++---------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers= /staging/gpib/agilent_82357a/agilent_82357a.c index c22c6bb30776..34d85a1bdb37 100644 --- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c +++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c @@ -19,7 +19,7 @@ MODULE_DESCRIPTION("GPIB driver for Agilent 82357A/B usb = adapters"); =20 #define MAX_NUM_82357A_INTERFACES 128 static struct usb_interface *agilent_82357a_driver_interfaces[MAX_NUM_8235= 7A_INTERFACES]; -DEFINE_MUTEX(agilent_82357a_hotplug_lock); // protect board insertion and = removal +static DEFINE_MUTEX(agilent_82357a_hotplug_lock); // protect board inserti= on and removal =20 static unsigned int agilent_82357a_update_status(gpib_board_t *board, unsi= gned int clear_mask); =20 diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/c= ommon/gpib_os.c index 3234d4348957..4901e660242e 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -2023,13 +2023,13 @@ static int t1_delay_ioctl(gpib_board_t *board, unsi= gned long arg) return 0; } =20 -const struct file_operations ib_fops =3D { -owner: THIS_MODULE, -llseek : NULL, -unlocked_ioctl : &ibioctl, -compat_ioctl : &ibioctl, -open : &ibopen, -release : &ibclose, +static const struct file_operations ib_fops =3D { + .owner =3D THIS_MODULE, + .llseek =3D NULL, + .unlocked_ioctl =3D &ibioctl, + .compat_ioctl =3D &ibioctl, + .open =3D &ibopen, + .release =3D &ibclose, }; =20 gpib_board_t board_array[GPIB_MAX_NUM_BOARDS]; diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpi= b/gpio/gpib_bitbang.c index 16e2d0c5642e..828c99ea613f 100644 --- a/drivers/staging/gpib/gpio/gpib_bitbang.c +++ b/drivers/staging/gpib/gpio/gpib_bitbang.c @@ -147,7 +147,7 @@ DEFINE_LED_TRIGGER(ledtrig_gpib); led_trigger_event(ledtrig_gpib, LED_OFF); } \ while (0) =20 -struct gpio_desc *all_descriptors[GPIB_PINS + SN7516X_PINS]; +static struct gpio_desc *all_descriptors[GPIB_PINS + SN7516X_PINS]; =20 #define D01 all_descriptors[0] #define D02 all_descriptors[1] @@ -175,7 +175,7 @@ struct gpio_desc *all_descriptors[GPIB_PINS + SN7516X_P= INS]; /* YOGA dapter uses a global enable for the buffer chips, re-using the TE = pin */ #define YOGA_ENABLE TE =20 -int gpios_vector[] =3D { +static int gpios_vector[] =3D { D01_pin_nr, D02_pin_nr, D03_pin_nr, diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/i= nes/ines_gpib.c index 846dafc85c11..22a05a287bce 100644 --- a/drivers/staging/gpib/ines/ines_gpib.c +++ b/drivers/staging/gpib/ines/ines_gpib.c @@ -357,38 +357,38 @@ struct ines_pci_id { enum ines_pci_chip pci_chip_type; }; =20 -struct ines_pci_id pci_ids[] =3D { - {vendor_id: PCI_VENDOR_ID_PLX, - device_id : PCI_DEVICE_ID_PLX_9050, - subsystem_vendor_id : PCI_VENDOR_ID_PLX, - subsystem_device_id : PCI_SUBDEVICE_ID_INES_GPIB, - gpib_region : 2, - io_offset : 1, - pci_chip_type : PCI_CHIP_PLX9050, +static struct ines_pci_id pci_ids[] =3D { + {.vendor_id =3D PCI_VENDOR_ID_PLX, + .device_id =3D PCI_DEVICE_ID_PLX_9050, + .subsystem_vendor_id =3D PCI_VENDOR_ID_PLX, + .subsystem_device_id =3D PCI_SUBDEVICE_ID_INES_GPIB, + .gpib_region =3D 2, + .io_offset =3D 1, + .pci_chip_type =3D PCI_CHIP_PLX9050, }, - {vendor_id: PCI_VENDOR_ID_AMCC, - device_id : PCI_DEVICE_ID_INES_GPIB_AMCC, - subsystem_vendor_id : PCI_VENDOR_ID_AMCC, - subsystem_device_id : PCI_SUBDEVICE_ID_INES_GPIB, - gpib_region : 1, - io_offset : 1, - pci_chip_type : PCI_CHIP_AMCC5920, + {.vendor_id =3D PCI_VENDOR_ID_AMCC, + .device_id =3D PCI_DEVICE_ID_INES_GPIB_AMCC, + .subsystem_vendor_id =3D PCI_VENDOR_ID_AMCC, + .subsystem_device_id =3D PCI_SUBDEVICE_ID_INES_GPIB, + .gpib_region =3D 1, + .io_offset =3D 1, + .pci_chip_type =3D PCI_CHIP_AMCC5920, }, - {vendor_id: PCI_VENDOR_ID_INES_QUICKLOGIC, - device_id : PCI_DEVICE_ID_INES_GPIB_QL5030, - subsystem_vendor_id : PCI_VENDOR_ID_INES_QUICKLOGIC, - subsystem_device_id : PCI_DEVICE_ID_INES_GPIB_QL5030, - gpib_region : 1, - io_offset : 1, - pci_chip_type : PCI_CHIP_QUICKLOGIC5030, + {.vendor_id =3D PCI_VENDOR_ID_INES_QUICKLOGIC, + .device_id =3D PCI_DEVICE_ID_INES_GPIB_QL5030, + .subsystem_vendor_id =3D PCI_VENDOR_ID_INES_QUICKLOGIC, + .subsystem_device_id =3D PCI_DEVICE_ID_INES_GPIB_QL5030, + .gpib_region =3D 1, + .io_offset =3D 1, + .pci_chip_type =3D PCI_CHIP_QUICKLOGIC5030, }, - {vendor_id: PCI_VENDOR_ID_QUANCOM, - device_id : PCI_DEVICE_ID_QUANCOM_GPIB, - subsystem_vendor_id : -1, - subsystem_device_id : -1, - gpib_region : 0, - io_offset : 4, - pci_chip_type : PCI_CHIP_QUANCOM, + {.vendor_id =3D PCI_VENDOR_ID_QUANCOM, + .device_id =3D PCI_DEVICE_ID_QUANCOM_GPIB, + .subsystem_vendor_id =3D -1, + .subsystem_device_id =3D -1, + .gpib_region =3D 0, + .io_offset =3D 4, + .pci_chip_type =3D PCI_CHIP_QUANCOM, }, }; =20 --=20 2.47.1