From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 96B9D36165A for ; Tue, 27 Jan 2026 15:26:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769527614; cv=none; b=O9JFGTKDtmLvCtoLEo2re1VY+vV4J9YAH+PNVIyIQ2ikXrSn2vFqMV023CP8iNg/Dw3nppNte/hjKE0foMDdIsquA6kcJg4FqrRxMU80m1LZjBcw504DIr/wmZ7yq3Eh1rxCIBg05RGO4sou+XoHVZS2zxIlalSkDbhBV4jQGvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769527614; c=relaxed/simple; bh=F9xTLnDJ36UK2/bwLa5uPJNh5MPQpxStIssCGLC6v84=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IgXYVEbbss9nIhIkDQPcRCHLjcAfdVrmLyPDXrswse1AzO6LNxxITMMHZ+CibwgMCR+Zs6LbZZXjqRphy/9CXZwDbJJ9kbQExiVyM8sB1MGc6TSdcbwkuuw5PVbT/f3XvJ923YPDxttq1K3olQMkhf0KAFHxc54t+gHykMo8XkY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=TiVmKdZ6; arc=none smtp.client-ip=148.163.156.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="TiVmKdZ6" Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 60R5PiDL018643; Tue, 27 Jan 2026 15:26:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=rzwM3S NkJPUenvYYJ9BpHsawJ88aj5wkl7GMx5+g1Mc=; b=TiVmKdZ6H04eSHVoibBDcP cLHDu+Sp6UkVEakTNEHHfmlM4uDgh/F5WbbEz30X28m8oi8xlO+FjytGDGfhwuah +4d6ZEME1wKgZ3kqu+zL8GQRARfkMZ1oj9O8Sijor7sdggDezcL0LPxqQxAh4Xif TxhmUN3MsfigbQuw4ruy1e5Kag5umE/ipdz+ckmGsG/Rmg2WG6kFECiJ/5l7u8WB VOqmsYFgRJm+3Uxa185vMSo15lU4+CTC+etU/g3tbQPAFSkx2T/sXYEiqE/QUPBA yIZW58RKzVVYvseZncRY6vKhMCJKOnn7Ju2CPYB7AmqfXQ5HcZInH8Bx3gS7WNXQ == Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4bvnt7p4wx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Jan 2026 15:26:49 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 60RDEoQX031044; Tue, 27 Jan 2026 15:26:48 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4bw8dsh8j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Jan 2026 15:26:48 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 60RFQmMd33620638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Jan 2026 15:26:48 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2AA1B5805D; Tue, 27 Jan 2026 15:26:48 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2D1A58056; Tue, 27 Jan 2026 15:26:47 +0000 (GMT) Received: from [9.61.135.234] (unknown [9.61.135.234]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 27 Jan 2026 15:26:47 +0000 (GMT) Message-ID: Date: Tue, 27 Jan 2026 09:26:47 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 06/13] fsi: Make fsi_bus_type a private variable to the core To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= Cc: Ninad Palsule , linux-fsi@lists.ozlabs.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Eddie James In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 5uETjvsqCFhFYB4Xt9z32_mV1Pxw8IT4 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTI3MDEyNSBTYWx0ZWRfXzdX2gM8O7qrN Z0hVhHx5mugJasTG+BA8tnjwLofKL831LqyoytvVtqFdRzE01k/6iI5gTLGGwAdL6A8vPe0v/d6 UdKzgmGp1C3S+2EGkkcCuTy1A7zNwhssviodEojGYTZPDkBvmAN3B12EFnj3Qm6EJ1OlJEf4+mG jfzx6vu6wqwDoAmbdNeW7osi+sZ1d27BLuqlXUFt4rc4Na+9rvnvZWug+RILgW8MCYseyQDRwQP PHSomuXbg9LF82zK12rWYzvCaJ3OO4Dy3BjzsHQgsGFG7h9R85St97C5lckExMW+mfDzdClLkHF qamrh3L0kbhnkC6CNCIfDJMvBXlyqYzdZEuBZAflubk3KDGhJwFeFcAvZO0Psjre4ovUyEB5TdW WR+mLfFiv3oVxmmyrNIGpfafru+4MwzIcx4MaiudyQh6F79+mAkXwqQ8w/eSXG2CHB3YbX68HL/ H6UZZWpVI+XB1Q1/gKg== X-Authority-Analysis: v=2.4 cv=Zs3g6t7G c=1 sm=1 tr=0 ts=6978d939 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VnNF1IyMAAAA:8 a=IpJZQVW2AAAA:8 a=G_Le1F4rImn9bFuGnewA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IawgGOuG5U0WyFbmm1f5:22 X-Proofpoint-ORIG-GUID: 5uETjvsqCFhFYB4Xt9z32_mV1Pxw8IT4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-27_03,2026-01-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 adultscore=0 phishscore=0 suspectscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2601150000 definitions=main-2601270125 On 12/9/25 5:40 AM, Uwe Kleine-König wrote: > There are no users of fsi_bus_type outside of fsi-core.c, so make that > variable static, don't export it and drop the declaration from the > public header file. > > As there is a usage of fsi_bus_type in fsi_create_device() the > definition of that variable must happen further up in the file to not > have to add a local declaration. Acked-by: Eddie James > > Signed-off-by: Uwe Kleine-König > --- > drivers/fsi/fsi-core.c | 67 +++++++++++++++++++++--------------------- > include/linux/fsi.h | 1 - > 2 files changed, 33 insertions(+), 35 deletions(-) > > diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c > index e1ea1124282e..4e60d4b17c11 100644 > --- a/drivers/fsi/fsi-core.c > +++ b/drivers/fsi/fsi-core.c > @@ -100,6 +100,39 @@ static int fsi_master_write(struct fsi_master *master, int link, > uint8_t slave_id, uint32_t addr, const void *val, size_t size); > static int fsi_master_break(struct fsi_master *master, int link); > > +/* FSI core & Linux bus type definitions */ > + > +static int fsi_bus_match(struct device *dev, const struct device_driver *drv) > +{ > + struct fsi_device *fsi_dev = to_fsi_dev(dev); > + const struct fsi_driver *fsi_drv = to_fsi_drv(drv); > + const struct fsi_device_id *id; > + > + if (!fsi_drv->id_table) > + return 0; > + > + for (id = fsi_drv->id_table; id->engine_type; id++) { > + if (id->engine_type != fsi_dev->engine_type) > + continue; > + if (id->version == FSI_VERSION_ANY || > + id->version == fsi_dev->version) { > + if (drv->of_match_table) { > + if (of_driver_match_device(dev, drv)) > + return 1; > + } else { > + return 1; > + } > + } > + } > + > + return 0; > +} > + > +static const struct bus_type fsi_bus_type = { > + .name = "fsi", > + .match = fsi_bus_match, > +}; > + > /* > * fsi_device_read() / fsi_device_write() / fsi_device_peek() > * > @@ -1359,34 +1392,6 @@ void fsi_master_unregister(struct fsi_master *master) > } > EXPORT_SYMBOL_GPL(fsi_master_unregister); > > -/* FSI core & Linux bus type definitions */ > - > -static int fsi_bus_match(struct device *dev, const struct device_driver *drv) > -{ > - struct fsi_device *fsi_dev = to_fsi_dev(dev); > - const struct fsi_driver *fsi_drv = to_fsi_drv(drv); > - const struct fsi_device_id *id; > - > - if (!fsi_drv->id_table) > - return 0; > - > - for (id = fsi_drv->id_table; id->engine_type; id++) { > - if (id->engine_type != fsi_dev->engine_type) > - continue; > - if (id->version == FSI_VERSION_ANY || > - id->version == fsi_dev->version) { > - if (drv->of_match_table) { > - if (of_driver_match_device(dev, drv)) > - return 1; > - } else { > - return 1; > - } > - } > - } > - > - return 0; > -} > - > int fsi_driver_register(struct fsi_driver *fsi_drv) > { > if (!fsi_drv) > @@ -1406,12 +1411,6 @@ void fsi_driver_unregister(struct fsi_driver *fsi_drv) > } > EXPORT_SYMBOL_GPL(fsi_driver_unregister); > > -const struct bus_type fsi_bus_type = { > - .name = "fsi", > - .match = fsi_bus_match, > -}; > -EXPORT_SYMBOL_GPL(fsi_bus_type); > - > static int __init fsi_init(void) > { > int rc; > diff --git a/include/linux/fsi.h b/include/linux/fsi.h > index 05be75869a69..3e3a8f3adac3 100644 > --- a/include/linux/fsi.h > +++ b/include/linux/fsi.h > @@ -78,7 +78,6 @@ extern int fsi_slave_read(struct fsi_slave *slave, uint32_t addr, > extern int fsi_slave_write(struct fsi_slave *slave, uint32_t addr, > const void *val, size_t size); > > -extern const struct bus_type fsi_bus_type; > extern const struct device_type fsi_cdev_type; > > enum fsi_dev_type {