From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8031406827 for ; Thu, 11 Jun 2026 13:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781183425; cv=none; b=a9LJKEESpaFPxsF2YhxiaiZsS9wwGVFJCIZ8h2wMmyXcqcMjnvZlNCnhI/lLNad0PoQuLkipPk7aN9rzYMYgz3ZxgODWfSY5oOmKevaqEIbZBhM0/RWXvtNhsMjMkuHILib76BovGp0IFe8Q2eG67YH+8WXKs+mUZV5Lmv1Chuc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781183425; c=relaxed/simple; bh=HlKxm4iuRZcCNXQKVVJ21X5JWAoBVjUgvnDCpHJK5JA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UurxbwId/UoUaAAnGmqoFmdGckqblrks7edanxFqF8j8THZXdaytTQmaJyvor0cly4F1G8CIB0nK2ZhQUD9IYl+MIfi/YAnrXWpoa9v3JVmek03cvhckeK9dn9qMIH+p0yye4uR+nAwVPmVNDbS3M8Hp6rvcElphJFHOeTGv1g4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XjXrFD4r; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XjXrFD4r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C90C1F00893; Thu, 11 Jun 2026 13:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781183422; bh=D9O/NhSOj/ukGaU6L5S/geCWpSJLvWx74UgiyAUBFIg=; h=From:To:Cc:Subject:Date; b=XjXrFD4rkkuVDzvFT6d38KG+J3SM8mD62vaeFaqR3PZINxDVk4IY6129GbxIiYwAo tq812REnIcj0qpgNurVCrN2cFhEEEAm/4iXbq/S2zp6YtzFFFVZ2Xse1aA1rQg8KP2 nBBl6515wEb3BrF5hVRnmgo4ByTIMsJg7UuYDjs0ReN/4FeEgqP/g/vhzkk+1xL/ln 23Ms0adcY61TTkI/Pj8C3tHv7bHwreH/hZKUgwRMv2AwQ4GK6VWyzd78/CMxOivcKw qnGHo7SoDbwIWhK/6imxt0EFXJoUAdYIFQXO7CaEDqwvdcOf988IKAlRF6pLNObs0c qvekUq8hqexBg== From: Arnd Bergmann To: Dave Penkler , Greg Kroah-Hartman Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] gpib: use 'static inline' instead of 'extern inline' Date: Thu, 11 Jun 2026 15:10:07 +0200 Message-Id: <20260611131018.3662609-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann With GNU inline semantics, an 'extern inline' function is only included in the build if it can be inlined. When the compiler for some reason decides against inlining it, this causes a link failure, as observed in one function in the tnt4882_gpib driver: ld.lld: error: undefined symbol: mite_irq >>> referenced by tnt4882_gpib.c:974 (/home/arnd/arm-soc/drivers/gpib/tnt4882/tnt4882_gpib.c:974) >>> drivers/gpib/tnt4882/tnt4882_gpib.o:(ni_pci_attach) in archive vmlinux.a Change all of the 'extern inline' definitions in gpib to the regular 'static inline' to avoid this. Fixes: 0cd5b05551e0 ("staging: gpib: Add TNT4882 chip based GPIB driver") Fixes: 6c52d5e3cde2 ("staging: gpib: Add common include files for GPIB drivers") Signed-off-by: Arnd Bergmann --- drivers/gpib/include/amccs5933.h | 10 +++++----- drivers/gpib/tnt4882/mite.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpib/include/amccs5933.h b/drivers/gpib/include/amccs5933.h index d7f63c795096..f8a80bdc70dc 100644 --- a/drivers/gpib/include/amccs5933.h +++ b/drivers/gpib/include/amccs5933.h @@ -13,7 +13,7 @@ enum { }; // incoming mailbox 0-3 register offsets -extern inline int INCOMING_MAILBOX_REG(unsigned int mailbox) +static inline int INCOMING_MAILBOX_REG(unsigned int mailbox) { return (0x10 + 4 * mailbox); }; @@ -29,25 +29,25 @@ enum { }; // select byte 0 to 3 of incoming mailbox -extern inline int INBOX_BYTE_BITS(unsigned int byte) +static inline int INBOX_BYTE_BITS(unsigned int byte) { return (byte & 0x3) << 8; }; // select incoming mailbox 0 to 3 -extern inline int INBOX_SELECT_BITS(unsigned int mailbox) +static inline int INBOX_SELECT_BITS(unsigned int mailbox) { return (mailbox & 0x3) << 10; }; // select byte 0 to 3 of outgoing mailbox -extern inline int OUTBOX_BYTE_BITS(unsigned int byte) +static inline int OUTBOX_BYTE_BITS(unsigned int byte) { return (byte & 0x3); }; // select outgoing mailbox 0 to 3 -extern inline int OUTBOX_SELECT_BITS(unsigned int mailbox) +static inline int OUTBOX_SELECT_BITS(unsigned int mailbox) { return (mailbox & 0x3) << 2; }; diff --git a/drivers/gpib/tnt4882/mite.h b/drivers/gpib/tnt4882/mite.h index a1fdba9672a0..dd251afa90e3 100644 --- a/drivers/gpib/tnt4882/mite.h +++ b/drivers/gpib/tnt4882/mite.h @@ -45,12 +45,12 @@ struct mite_struct { extern struct mite_struct *mite_devices; -extern inline unsigned int mite_irq(struct mite_struct *mite) +static inline unsigned int mite_irq(struct mite_struct *mite) { return mite->pcidev->irq; }; -extern inline unsigned int mite_device_id(struct mite_struct *mite) +static inline unsigned int mite_device_id(struct mite_struct *mite) { return mite->pcidev->device; }; -- 2.39.5