From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 68B7618C337 for ; Thu, 9 Jan 2025 18:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736446258; cv=none; b=eCgw0aRXqX5aQTj/8kWv/vB0H5ajWcrrodx/BjiGWEKinSbtZkNCmFskrZwBaUwK7th8o6JqzWd/oUmjWyNZrJ61glVJk0NfpXpi05cnSaEyhAU5wjub+voHEZqRBrlzU2zc/L0+MovbZiIQRPADBFNz6Nqckub6n0dTldjnfPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736446258; c=relaxed/simple; bh=9G2PTmcQpaZ46102a6x6nR7jMG7C4cnKfsVGM8nvYhs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gs5mGNycQkq/PbCPNIdiGDJUV8GMlpkTG0ZZFKlP2KyhXqri3lldJfbg71BC9ZgZUluRbOsGnSMDxFaLDOONu/EoH2YHGLZMNPq9YOxvy/1mcCinfgsEh+THb2HXO8405s7f/faIYq78w0UfOhW0CcGlUS9nccmjBHf4634TDyY= 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=rloVgxYR; arc=none smtp.client-ip=148.163.158.5 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="rloVgxYR" Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 509E6pLM010808; Thu, 9 Jan 2025 18:10:32 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=GdVi4V CrITqQbu2rji4GK/bxAsg9yZp3gsvLKG7P/mA=; b=rloVgxYRVmBTTAOqK9o5qv g5MoDq7aCmZBugcfmfZdjY+S9N4PYSnmQ11Dojvxm2uhTtW9O/ZzrhHDMbWgQL+c PVTFi+AFcq2+nWerc7VfKDGRaAkTukn+ZOfwV0c0cvO5WizKdHKMibwiorXDW0Jb xNuwdkasfHTumMoCT2UiQJ6se9AF+f0dAGjKmab6OnryM7m/dfJdjtqEykTjWEqJ U4+8uNfgSSQT5kDWWIzmDpUqo9veC06cG0emTH6UbhAw6JRxh3/8EF4NllV+zmaX BUd785ez8Vjmh9Xrm21KkknVI37iCQzrVgcduSA4c924D2dDLuqtCbBpX9YFqqaw == Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 442fx593ww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jan 2025 18:10:32 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 509HpRhp026195; Thu, 9 Jan 2025 18:10:31 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 43yj12e47a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 Jan 2025 18:10:31 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 509IAVXd14549604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Jan 2025 18:10:31 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2A8B958053; Thu, 9 Jan 2025 18:10:31 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 943CC58043; Thu, 9 Jan 2025 18:10:30 +0000 (GMT) Received: from [9.61.130.82] (unknown [9.61.130.82]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 9 Jan 2025 18:10:30 +0000 (GMT) Message-ID: <3b95537e-f5fe-4aea-a7f1-a9aec3bdb8f6@linux.ibm.com> Date: Thu, 9 Jan 2025 12:10:26 -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] fsi: core: Use const 'struct bin_attribute' callbacks To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Jeremy Kerr , Joel Stanley , Alistar Popple Cc: linux-fsi@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20241215-sysfs-const-bin_attr-fsi-v1-1-b717f76a0146@weissschuh.net> Content-Language: en-US From: Eddie James In-Reply-To: <20241215-sysfs-const-bin_attr-fsi-v1-1-b717f76a0146@weissschuh.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: noNgnIaNU5ASHg5cgJ46MeyzPSxNZmcO X-Proofpoint-ORIG-GUID: noNgnIaNU5ASHg5cgJ46MeyzPSxNZmcO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-15_01,2024-10-11_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1011 spamscore=0 suspectscore=0 impostorscore=0 phishscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501090142 On 12/15/24 08:10, Thomas Weißschuh wrote: > The sysfs core now provides callback variants that explicitly take a > const pointer. Make use of it to match the attribute definition. Thanks Reviewed-by: Eddie James > > Signed-off-by: Thomas Weißschuh > --- > drivers/fsi/fsi-core.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c > index e2e1e9df611543343a8498cdc425528a3e44619a..50e8736039fe686dd402ecf8fabe37a4c237d71b 100644 > --- a/drivers/fsi/fsi-core.c > +++ b/drivers/fsi/fsi-core.c > @@ -554,7 +554,7 @@ static unsigned long aligned_access_size(size_t offset, size_t count) > } > > static ssize_t fsi_slave_sysfs_raw_read(struct file *file, > - struct kobject *kobj, struct bin_attribute *attr, char *buf, > + struct kobject *kobj, const struct bin_attribute *attr, char *buf, > loff_t off, size_t count) > { > struct fsi_slave *slave = to_fsi_slave(kobj_to_dev(kobj)); > @@ -581,7 +581,7 @@ static ssize_t fsi_slave_sysfs_raw_read(struct file *file, > } > > static ssize_t fsi_slave_sysfs_raw_write(struct file *file, > - struct kobject *kobj, struct bin_attribute *attr, > + struct kobject *kobj, const struct bin_attribute *attr, > char *buf, loff_t off, size_t count) > { > struct fsi_slave *slave = to_fsi_slave(kobj_to_dev(kobj)); > @@ -613,8 +613,8 @@ static const struct bin_attribute fsi_slave_raw_attr = { > .mode = 0600, > }, > .size = 0, > - .read = fsi_slave_sysfs_raw_read, > - .write = fsi_slave_sysfs_raw_write, > + .read_new = fsi_slave_sysfs_raw_read, > + .write_new = fsi_slave_sysfs_raw_write, > }; > > static void fsi_slave_release(struct device *dev) > > --- > base-commit: 2d8308bf5b67dff50262d8a9260a50113b3628c6 > change-id: 20241215-sysfs-const-bin_attr-fsi-726b76d56a15 > > Best regards,