From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 1F61F3839B8 for ; Tue, 12 May 2026 10:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778583528; cv=none; b=RGWgg0DJAZPa6bwsT35ONIpcSTFJp5ck6XIcwyVhz3PJhGEJoGEzXOENGfTSn9vVy9D25gsgeny879CeqUmqdKbdVAOTJnllplw5jFIl8eJUrVXjtgscbj38q+TktWOsP2hd413d0+Prw3pGnypV39ivIO2fN0wZRVQ8hI7Zl+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778583528; c=relaxed/simple; bh=hitToUL3oLaAJjR33bcRreUkZrjch7BQjgewsamg+qQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RUaO4xUzqA4H5/skAcOCaGnvAhvSH68zcU0ThtGteQljtT6d0jal1T0HtypUiHLdfPeIFZ7FFRnGWW9Tetz4wJaTNh3ncRAKiVE1Zye/3Bk8/hSWyEjCpF7J7bIlsVS1R1+PKF2PTWNF/mPvr+wtBAfqnmnEfE8xUcDBvCmJk6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YOlk3grL; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YOlk3grL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778583528; x=1810119528; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=hitToUL3oLaAJjR33bcRreUkZrjch7BQjgewsamg+qQ=; b=YOlk3grLFo/XPmxBl04hwKUI+sdP4gyMM164TAiEVlZI9mp2vJ1ncME1 xjMXYv3VVvPJvhGEVmtRI5AYkB/vLsJ0nOYi4woiaO5PY0yIzewiPGEax delIDp25dZTTl19kjnXH7XrhA/3O4Sg64+grQOLNFB+98yqM/F2cR3Qf9 /M1xQBJI6doorCB/eslKhE+SG0Tb8c2UXaKFQdyoduzCa3TC67+ssHLRB nI9aDv9jN474qW52IGmHVqfc9U84+pYiQvU/nfQNmpKiwwDQKkxiEm4VG r3rCY2yeRXudKbB4v60/8TkJfLF6ThM1EgGVBEwF+HYWf5R5LQiq0xtsA w==; X-CSE-ConnectionGUID: muHOFUPdSqGkpCVc1MqIGg== X-CSE-MsgGUID: VE0xc4piQWKFa3OSQecL1w== X-IronPort-AV: E=McAfee;i="6800,10657,11783"; a="83103883" X-IronPort-AV: E=Sophos;i="6.23,230,1770624000"; d="scan'208";a="83103883" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 03:58:47 -0700 X-CSE-ConnectionGUID: vXcVdzhrQ6OfBrneXwzjJw== X-CSE-MsgGUID: mHWH5NtSRxK0GrjpAjzi6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,230,1770624000"; d="scan'208";a="235069871" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.112]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2026 03:58:44 -0700 Date: Tue, 12 May 2026 13:58:42 +0300 From: Andy Shevchenko To: Harshit Shaw Cc: deller@gmx.de, gregkh@linuxfoundation.org, chintanlike@gmail.com, tzimmermann@suse.de, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: fbtft: convert sysfs attributes to use attribute_group Message-ID: References: <20260512092817.1941-1-shawharshit116@gmail.com> 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: <20260512092817.1941-1-shawharshit116@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Tue, May 12, 2026 at 09:28:17AM +0000, Harshit Shaw wrote: > Replace direct device_create_file() and device_remove_file() calls > with the correct attribute_group API using sysfs_create_group() and > sysfs_remove_group(). This is the proper way to register sysfs > attributes in kernel drivers. ... > +static DEVICE_ATTR(gamma, 0644, show_gamma_curve, store_gamma_curve); > +static DEVICE_ATTR(debug, 0644, show_debug, store_debug); Move each of them closer to the used callbacks. Also there is DEVICE_ATTR_RW() macro. ... > +static struct attribute *fbtft_attrs[] = { > + &dev_attr_debug.attr, > + NULL, Don't put trailing commas in terminator entries. > +}; ... > +static struct attribute *fbtft_gamma_attrs[] = { > + &dev_attr_gamma.attr, > + NULL, Ditto. > +}; ... Also these definitions should be moved closer to the related initialisers. -- With Best Regards, Andy Shevchenko