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


Groups > linux.kernel > #1705702

Re: [PATCH] ata: make ata_port_operations const

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ata: make ata_port_operations const
Date Mon, 07 Aug 2017 18:40:02 +0200
Message-ID <ubTeq-2HP-9@gated-at.bofh.it> (permalink)
References <ubNC1-714-5@gated-at.bofh.it> <ubRPl-1xo-33@gated-at.bofh.it> <ubS8H-1Uh-49@gated-at.bofh.it> <ubT4K-2E7-37@gated-at.bofh.it>
X-Session-Marker 6A6F6540706572636865732E636F6D
X-Spam-Summary 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2918:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3874:4321:5007:6119:7974:8603:10004:10400:10848:11232:11658:11914:12296:12663:12740:12760:12895:13069:13311:13357:13439:14180:14659:14721:21080:21325:21433:21434:21627:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none
X-He-Tag shame46_5f2507c03e31e
X-Filterd-Recvd-Size 1719
Content-Type text/plain; charset="ISO-8859-1"
X-Mailer Evolution 3.22.6-1ubuntu1
MIME-Version 1.0
Content-Transfer-Encoding 7bit
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 19
Organization linux.* mail to news gateway
X-Original-Cc Julia Lawall <julia.lawall@lip6.fr>, b.zolnierkie@samsung.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Mon, 07 Aug 2017 09:34:12 -0700
X-Original-Message-ID <1502123652.2219.24.camel@perches.com>
X-Original-References <1502101922-13313-1-git-send-email-bhumirks@gmail.com> <20170807150727.GD4050379@devbig577.frc2.facebook.com> <CAOH+1jEQy3PrExruDLWetVd=iWYX3sf13Ku5G5CUUbJGADsNvw@mail.gmail.com> <20170807162920.GA537256@devbig577.frc2.facebook.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1705702

Show key headers only | View raw


On Mon, 2017-08-07 at 09:29 -0700, Tejun Heo wrote:
> Hello,
> 
> On Mon, Aug 07, 2017 at 08:54:21PM +0530, Bhumika Goyal wrote:
> > I compiled the .o files and checked the size before and after
> > compilation. After making the structure const, bytes should move from
> > data to text segment of the memory and this is what happened. So, this
> > is how I tested it.
> 
> Ah, I see, so the port_operations is never used directly.  I'm not
> sure whether it'd be a good idea to selectively pick these and makr
> them const.  Let's just leave them be.

Why?

Things that are never accessed as other than const should
be const no?

Why leave unnecessary exposure for muckery?

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


Thread

[PATCH] ata: make ata_port_operations const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-07 12:40 +0200
  Re: [PATCH] ata: make ata_port_operations const Tejun Heo <tj@kernel.org> - 2017-08-07 17:10 +0200
    Re: [PATCH] ata: make ata_port_operations const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-07 17:30 +0200
      Re: [PATCH] ata: make ata_port_operations const Tejun Heo <tj@kernel.org> - 2017-08-07 18:30 +0200
        Re: [PATCH] ata: make ata_port_operations const Joe Perches <joe@perches.com> - 2017-08-07 18:40 +0200
          Re: [PATCH] ata: make ata_port_operations const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-08 10:20 +0200

csiph-web