From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) (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 30EF34779D for ; Mon, 4 Nov 2024 13:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730728352; cv=none; b=friimN8v6rK+gcjv+W3OyL6hTrrj3wDTy2HBVzUni9Q365FddMxc5zp7hd8e5c52ybw5BX+w7b62YeGFAV0w6m3SVV+W0MZblfMfUK1CBv7emp53RjA8Ylrp44VEMo+gmytS+2BGQd/ShzWCE2KX8NI7M45kz/1gKpBR8qDkiU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730728352; c=relaxed/simple; bh=va+mJ8jqYuF1m2DMlIh3VClRv2mNCKxpQOuHse15mgE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hUzDmfl93mNex8efFzQLdwCyOv8vd8bqutsIsj2MTo4L119Ll9SLdG2QZriRZU5ZaYSIxv7hwRVEnIPH4CxlSFFNjQkaeh8xZGW6J1zhJG+uwKb8HLz1i/wxA0TDW1UVNsWDwXJaFOGPfQiPOM6T/imBfzvMKvxSXCBdGGV3RN0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=TNddlwN/; arc=none smtp.client-ip=209.85.222.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="TNddlwN/" Received: by mail-ua1-f48.google.com with SMTP id a1e0cc1a2514c-84fc7b58d4dso1157408241.0 for ; Mon, 04 Nov 2024 05:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1730728349; x=1731333149; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=EkBaJUaQmNlDT9UG7F3IUEDB61PJd1lepS1O8vS2Df4=; b=TNddlwN/cQFlt9b9NOt4ygwx4ZmhdBnD7UfEqeL0yjQxKSL4n2gd4M6UaUGP4tOFL4 YuDG5FuzEu7aQQ4U2Ak4kTWSWSL7pEIowGcwnpuKcdxz16CGtbmzPEAdyt83jXZqbfGU IHojgiML0TF/a44/SfqOP53DqR1P2zxpRF3cqXyECVvQJEEUaz8xBPf+Yp6osgB1tMJU rPHo7yuMB7lCs2OKBGFOnWom33RdUE0FUwr9oQmPO/dbhu9U7RL+i8Nn+eAJmmU7tgLx l2ps9Leuc9AuGigcaoqZgKVPB8n0g4AMAloCHCsvocu84DwwJaEhLIdxm1s5/3di0NL2 eonQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730728349; x=1731333149; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EkBaJUaQmNlDT9UG7F3IUEDB61PJd1lepS1O8vS2Df4=; b=MZcuXKZtnsO2fJ2NWC1XpAvZNR6iFe7JQLVBwJ74dNniyhmAuCBMj1lvuzxpLCkSgs 4h0Av4c03MMtHCN/RnobkyTJXMhmO5vwmsbZOYDerb7/P2SQ2N3yQtire3eAwYb+5DnQ I0CXulhLeVlb7SkEHyX3c3iFfcxl2xxcioqESP8gU45oYr1E5/VAGhZ7L2zbu8+m5iPq CZgqmHePIgdbT1D8Vj62sQDWL55iT/HvoEdrmOtiPsZdUqkpQQhs9u/mahbryeU0C7HY VfErYwnAlc1j/mhpeGk9Dq36dM959A0lmDopLv6gPJhPNRFpg3l7d17gOgnOqWA84I4A ypjQ== X-Forwarded-Encrypted: i=1; AJvYcCWxSxhuP1+UPsvuSz/UESe9ewxGbKQpTBVc1kekvYZWJ0KMRx7yMqKqF9tt7/HJAFymwN3Qxu3IDAbrzgk=@vger.kernel.org X-Gm-Message-State: AOJu0YyB5R9ClrVj66mU6DyOgXVqf7391P3RzNst/ZTtfacN4pDNeNFe QKylmAaEVPtMVYUrFi0EGPw33TwGIMI+V4H5ay/MIV98j90I/8ROOy4x7sj7sk8= X-Google-Smtp-Source: AGHT+IFmlPTEulo8PrBSa4hLGepjHWucd1eo0mnO56qT1Ydh9XheeGVoeKHcAHFWhX+avIDDQrBpSQ== X-Received: by 2002:a05:6102:3753:b0:4a4:8756:d899 with SMTP id ada2fe7eead31-4a9543ece24mr15248394137.29.1730728348895; Mon, 04 Nov 2024 05:52:28 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-128-5.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.128.5]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-462ad0adffesm47192441cf.32.2024.11.04.05.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 05:52:28 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1t7xVL-00000000hsn-2kgO; Mon, 04 Nov 2024 09:52:27 -0400 Date: Mon, 4 Nov 2024 09:52:27 -0400 From: Jason Gunthorpe To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Bjorn Helgaas , Srinivas Kandagatla , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Xinhui Pan , David Airlie , Simona Vetter , Dennis Dalessandro , Leon Romanovsky , Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Naveen Krishna Chatradhi , Carlos Bilbao , Hans de Goede , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , "David E. Box" , "James E.J. Bottomley" , "Martin K. Petersen" , Richard Henderson , Matt Turner , Frederic Barrat , Andrew Donnellan , Arnd Bergmann , Logan Gunthorpe , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Dan Williams , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-cxl@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, linux-mtd@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH v2 05/10] sysfs: treewide: constify attribute callback of bin_is_visible() Message-ID: <20241104135227.GE35848@ziepe.ca> References: <20241103-sysfs-const-bin_attr-v2-0-71110628844c@weissschuh.net> <20241103-sysfs-const-bin_attr-v2-5-71110628844c@weissschuh.net> Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241103-sysfs-const-bin_attr-v2-5-71110628844c@weissschuh.net> On Sun, Nov 03, 2024 at 05:03:34PM +0000, Thomas Weißschuh wrote: > The is_bin_visible() callbacks should not modify the struct > bin_attribute passed as argument. > Enforce this by marking the argument as const. > > As there are not many callback implementers perform this change > throughout the tree at once. > > Signed-off-by: Thomas Weißschuh > --- > drivers/cxl/port.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- > drivers/infiniband/hw/qib/qib_sysfs.c | 2 +- > drivers/mtd/spi-nor/sysfs.c | 2 +- > drivers/nvmem/core.c | 3 ++- > drivers/pci/pci-sysfs.c | 2 +- > drivers/pci/vpd.c | 2 +- > drivers/platform/x86/amd/hsmp.c | 2 +- > drivers/platform/x86/intel/sdsi.c | 2 +- > drivers/scsi/scsi_sysfs.c | 2 +- > drivers/usb/core/sysfs.c | 2 +- > include/linux/sysfs.h | 30 +++++++++++++++--------------- > 12 files changed, 27 insertions(+), 26 deletions(-) For infiniband: Acked-by: Jason Gunthorpe