Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp91726lqt; Mon, 18 Mar 2024 02:18:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKb2d2lqcTLenndtDLJkHBbciM4HUeC6H/UFxOFJO2asyYXXTCcIVwj18x7p+MCGkLrZX9y0i4VE1YG7nLsvIvp+vBzM1d1ka7JuvsUQ== X-Google-Smtp-Source: AGHT+IFagfMV3FSxR/Y5u84DAxBJi/pNj4LphgdhjkcEi9lbt9aR+EdxhT/zkwa/7K8+x1gSGiFx X-Received: by 2002:a17:903:22c8:b0:1e0:226:900d with SMTP id y8-20020a17090322c800b001e00226900dmr6890849plg.66.1710753502415; Mon, 18 Mar 2024 02:18:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710753502; cv=pass; d=google.com; s=arc-20160816; b=G9hrk5MqWenzNo1k3OBzQ2NcHhSJJSW/wrYmrxDnyZREgJIxHKC0TCIvWeKSEz0mnn 5H9UYJpBShj6e3HSZziUsrzpW9BgdM9EQjGjtlRAT+XaDEeBdAXvhsZBBAMV3+RdgY5u vwTjBPuWnSbVQf+PUN9QSIVSfig56B7m9SP8Xjki5QgS6wV9gSSrMgpGkQkOU+t1A0XV Yu58jxXMt2gbCEAr0IrlL7az+GglMJbLjfkLHUoSBRTe3wCQPM1jnp2yLKk6s40TYIDe vN/ZvnXbJ3qkyXSJtdiSx0qWNhhdg3GUDzEE+lagnnqnhkPNcHJSQShnmNJf1ySK2T0u /6qQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:feedback-id:dkim-signature:dkim-signature; bh=0RFvEZpgNJ5bK7Ro7X/Ka3XCibshAo7oB/5HUK+KVBQ=; fh=97S/xwxVVCaDlnu7Nm/zOSK8bG14uFIXMn2+KIg2P5Q=; b=pFZ+BL7anyGG6GkUUSp6+SxnxctxBCcqBoE/Q2kjiXrpLUfYxT6MpGzs7N+S+vRPHZ W5o7KDx+7TZUc92zU46nT7ldYHZXNBr4HsnE7jYa4QbCvnUShV6UULsPGqQEZFVBUAzk yl+XKkmrVG9NBBLkuSl8nNyA0nWxUbSDmqSvQnkXv9cQU6GxunDUnKBJXOvVYkVNCCDV LLenUMcKcW3qFs+bbas0e9/K2i3VvEAg46j+x2rfJ7bHVQ/Be6Hs90yqrb/eOYQAhbKH 2zQJNNzb5TlLfgoo5im4K5p+o61hr+BFn73o3P9WQPmn98Ftl2DFx2Ibw/U9vKbH2Bgu I2cA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=W+VR4C0e; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=EnLSYf1e; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-105854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id me7-20020a170902fc4700b001dddc9754d9si3969096plb.466.2024.03.18.02.18.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 02:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=W+VR4C0e; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=EnLSYf1e; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-105854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 350A8B20F25 for ; Mon, 18 Mar 2024 09:18:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D12028DDA; Mon, 18 Mar 2024 09:18:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="W+VR4C0e"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="EnLSYf1e" Received: from wfout8-smtp.messagingengine.com (wfout8-smtp.messagingengine.com [64.147.123.151]) (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 5665D2C18F for ; Mon, 18 Mar 2024 09:18:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710753488; cv=none; b=Fg0Prh4uZhjK/5Ffbz9QHBdNErzGMCnVHQ9Yjq6SWXwUVTeDdCGTwZHCyLWaYhsKy1TIPbHYe8fABYkRW9i4RfF1qF9yG+UcWWUshv9ejaH65e4AqqW6+O82cS1mDfLJwXxN+gSVGKOY8p6EoH10Z90w6rB0jZlwwJdsO+nWlFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710753488; c=relaxed/simple; bh=ScHSHwihvRsqyvfslSI+2wXoLFxmTbTzzKqARaQ7TsA=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PbRnAjdqaBezXy8m+knQ25u8uka8roWpsZxtSrfV3D305L/RvUNP/4Qn1bNB24SUbQXebE4ZZHO3uSVhCz+TioswHrCpS+yJLRCujZ+WKOHkME82AqEnvj0Iub+JqKYfnSGCWKWOGwbepjTmwGThH0v28+Ksa8NrWhf/Mqoy/+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=W+VR4C0e; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=EnLSYf1e; arc=none smtp.client-ip=64.147.123.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id 380841C0009B; Mon, 18 Mar 2024 05:18:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 18 Mar 2024 05:18:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1710753484; x= 1710839884; bh=0RFvEZpgNJ5bK7Ro7X/Ka3XCibshAo7oB/5HUK+KVBQ=; b=W +VR4C0elU/mSiDZEMxJNgm8ecHs24zUwrCfoKXI6jHzCUup1ZQwHlsFExsw3PExE Td62LmG0S7JZWIeXnHfLH8GgGppcOwO31tSPu9B2RIC2wZJH9Gg1LDvnFoJEOyto oi5A7fXOFYN1lQC8hNrIxH13YGVY4Lc+3fXxs77BqfE3+Wx0lvOr4ykMQBdoOIqu Rs/JPLqTSz8MAwIaX+MLf8jPOfuF7nDhKF/R1oa8OHumeS635rZplq33arIc+RjC fYkgzYjjdf6DJttZAa+/4/J4i20DHun0qd6/NYro7RcLtvToDJAy03YdNF4d0fqQ balp2nQ8aFaLuAj4wqp2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1710753484; x=1710839884; bh=0RFvEZpgNJ5bK 7Ro7X/Ka3XCibshAo7oB/5HUK+KVBQ=; b=EnLSYf1e1waplDHDfU5zLBTOlmZ84 TPUujIVTZER0+vNoZwDUgpNpOJJ7SaUdoq0QIVamwDPwKZHtOrmLOFjtVLMCIhR2 IUSF+vh9TOqtXpNgF93o7NjsvpswJeypir6G7K8rfUthULAnKn6cY3W4YMVDMrwW +jgIl8TWkqC/XWcMkzNPw8HJDpkYLWyRFoLJ4MpubEZsq61MDNNZ6+p9sGjhRgaC iUgzmZQojp45rnEumFjfDeJxfFgUC2gTQ11kaj5O2+2xrQmVXsolY1sXdffAO9uJ uiqhm0allXYsdfV73xi7SB15KGfL6SZgYqB5HJXi6FgNZolouxdXSF2fw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkeejgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpeevfefffeekte fgveegfeelheffhfeujedtjeevtefhkeevkedtjeejvddtjefhjeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhisehsrg hkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Mar 2024 05:18:03 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] firewire: core: add memo about the caller of show functions for device attributes Date: Mon, 18 Mar 2024 18:17:58 +0900 Message-ID: <20240318091759.678326-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240318044609.GA659599@workstation.local> References: <20240318044609.GA659599@workstation.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In the case of firewire core function, the caller of show functions for device attributes is not only sysfs user, but also device initialization. This commit adds memo about it against the typical assumption that the functions are just dedicated to sysfs user. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index f208a02d0ebf..a8172a6c2caa 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -322,6 +322,7 @@ static ssize_t show_immediate(struct device *dev, if (value < 0) return -ENOENT; + // Note that this function is called by init_fw_attribute_group() with NULL pointer. return buf ? sysfs_emit(buf, "0x%06x\n", value) : 0; } @@ -357,6 +358,7 @@ static ssize_t show_text_leaf(struct device *dev, } } + // Note that this function is called by init_fw_attribute_group() with NULL pointer. if (buf) { bufsize = PAGE_SIZE - 1; } else { -- 2.43.0