From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbdGQKp2 (ORCPT ); Mon, 17 Jul 2017 06:45:28 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55395 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282AbdGQKp1 (ORCPT ); Mon, 17 Jul 2017 06:45:27 -0400 X-ME-Sender: X-Sasl-enc: KfQm6hDvLFytv7Z0EkLjJXgAnqV3KbDMESX/tD/ybRbk 1500288326 Date: Mon, 17 Jul 2017 12:45:22 +0200 From: Greg KH To: Arvind Yadav Cc: david.kershner@unisys.com, Timothy.Sell@unisys.com, bryan.thompson@unisys.com, jon.frisch@unisys.com, david.binder@unisys.com, sparmaintainer@unisys.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: unisys: visorbus: constify attribute_group structures. Message-ID: <20170717104522.GA32372@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 17, 2017 at 02:55:37PM +0530, Arvind Yadav wrote: > attribute_groups are not supposed to change at runtime. All functions > working with attribute_groups provided by work > with const attribute_group. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- > drivers/staging/unisys/visorbus/visorchipset.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) Why not just use the ATTRIBUTE_GROUPS() macro for these? Or is there something that is preventing that? thanks, greg k-h