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 849E7471279; Tue, 1 Sep 2026 10:06:28 +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=1788257189; cv=none; b=YLwAq/l5xXHpTN5Yl2cUkf1uenZZrKMSvt0hHIl70mSWPDWrSEyksd6SIXsMNLUZcNLYebOUMP3mnnJhM5icnj/9G051fFGIcTZH0RVMGhFDMrEaNXTYnjcguYQbjgIgmh3edoNC3KIwQ/qHn/m2U2xb0tTwh7TTuHkdq24PDw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788257189; c=relaxed/simple; bh=Q3ZCEwMr1dEmLD1Z0zHurk9SDakZFZ4ayQKgmSqlCTM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KduhTQGTiRlIgjSCmG/42m355xy6X0zaqfkurEEzi4i8l9b6KE2iSwD/OBC/DPD8LoGVMz3bFpD7DmrYteFedqGVexEsQ1Ts2ETS0/o9FM2J9VJ/akijpmoR7mX+Kxz8rp3hQIrNql+VrbrDcYjIInXFK/GjMWZRIGAClTZpLeg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ljIZ//55; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ljIZ//55" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCF8A1F000E9; Tue, 1 Sep 2026 10:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788257188; bh=l+V8ErxdIklyMFU5MbT0B2m95erwa8dF5k0IfBQxeZQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ljIZ//55T/3AVzB3RhNS2UgKKYZSd7WWusn3AdLEDMJtdA3XzKtR6svhPcXy5FeTH 86Gc+/FxZide4PAZ/8cFrObR4zhFeWit/WpOf4jTvLhF1Mpm31ntJJMogEilYiOzOz BuQpAQXOS8un0kEqChHjrvpHhvu9Q9tnelmIxgrY= Date: Tue, 1 Sep 2026 12:06:24 +0200 From: Greg Kroah-Hartman To: Tomasz Unger Cc: Rui Miguel Silva , Johan Hovold , Alex Elder , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: greybus: use sysfs_emit instead of sprintf in light.c Message-ID: <2026090110-storewide-briar-b062@gregkh> References: <20260819-greybus-light-sysfs-emit-v1-1-43c4b680de6a.ref@yahoo.pl> <20260819-greybus-light-sysfs-emit-v1-1-43c4b680de6a@yahoo.pl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260819-greybus-light-sysfs-emit-v1-1-43c4b680de6a@yahoo.pl> On Wed, Aug 19, 2026 at 05:44:55PM +0200, Tomasz Unger wrote: > Per Documentation/filesystems/sysfs.rst, new implementations of > show() methods should only use sysfs_emit() or sysfs_emit_at() > when formatting the value to be returned to user space, since it > is aware of the sysfs PAGE_SIZE buffer and includes sanity checks > that sprintf() lacks. > > This fixes fade_in_show() and fade_out_show() (both generated by > the gb_lights_fade_attr() macro) and color_show(). > > Signed-off-by: Tomasz Unger > --- > Verified with checkpatch.pl - no errors or warnings. > Compiled the gb-light module successfully with CONFIG_GREYBUS_LIGHT=m > and CONFIG_LEDS_CLASS_FLASH=m (both previously disabled). > greybus.ko, led-class-flash.ko and gb-light.ko all load without > errors in a QEMU environment (verified via insmod and lsmod, dmesg > shows no errors). This confirms the modules load cleanly but does > not exercise the changed sysfs show() code paths, which would > require an actual Greybus light device bound to the driver. > --- > drivers/staging/greybus/light.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Please see the archives for why this patch has been rejected in the past. sorry, greg k-h