Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685293

Re: [PATCH 3/3] PCI: hotplug: constify attribute_group structures.

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3] PCI: hotplug: constify attribute_group structures.
Date Tue, 11 Jul 2017 21:00:01 +0200
Message-ID <u28y5-5YV-3@gated-at.bofh.it> (permalink)
References <u1ZEu-sY-7@gated-at.bofh.it> <u1ZEu-sY-5@gated-at.bofh.it>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Language en-GB
Content-Transfer-Encoding 7bit
X-Tm-As-Gconf 00
X-Cbid 17071118-0012-0000-0000-000014A51730
X-Ibm-Spammodules-Versions BY=3.00007350; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00886138; UDB=6.00442301; IPR=6.00666287; BA=6.00005468; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016181; XFM=3.00000015; UTC=2017-07-11 18:55:47
X-Ibm-Av-Detection SAVI=unused REMOTE=unused XFE=unused
X-Cbparentid 17071118-0013-0000-0000-00004E8CFA74
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2017-07-11_10:,, signatures=0
X-Proofpoint-Spam-Details rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707110305
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 16
Organization linux.* mail to news gateway
X-Original-Cc linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
X-Original-Date Tue, 11 Jul 2017 11:55:40 -0700
X-Original-Message-ID <97d8f7b5-7939-6abb-4883-4582a16f374e@linux.vnet.ibm.com>
X-Original-References <1499765324-617-1-git-send-email-arvind.yadav.cs@gmail.com> <1499765324-617-2-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1685293

Show key headers only | View raw


On 07/11/2017 02:28 AM, Arvind Yadav wrote:
> attribute_groups are not supposed to change at runtime. All functions
> working with attribute_groups provided by <linux/sysfs.h> work
> with const attribute_group. So mark the non-const structs as const.
> 
> File size before:
>    text	   data	    bss	    dec	    hex	filename
>     418	    160	      8	    586	    24a	drivers/pci/hotplug/rpadlpar_sysfs.o
> 
> File size After adding 'const':
>    text	   data	    bss	    dec	    hex	filename
>     482	     96	      8	    586	    232	drivers/pci/hotplug/rpadlpar_sysfs.o
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] PCI: hotplug: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-11 11:30 +0200
  Re: [PATCH 3/3] PCI: hotplug: constify attribute_group structures. Tyrel Datwyler <tyreld@linux.vnet.ibm.com> - 2017-07-11 21:00 +0200

csiph-web