Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751166AbdFUTTQ (ORCPT ); Wed, 21 Jun 2017 15:19:16 -0400 Received: from smtprelay0122.hostedemail.com ([216.40.44.122]:49885 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751108AbdFUTTP (ORCPT ); Wed, 21 Jun 2017 15:19:15 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3873:3874:4250:4321:4362:5007:6117:7856:9389:10004:10400:10848:11026:11232:11473:11658:11783:11914:12043:12114:12296:12438:12663:12679:12740:12895:13069:13255:13311:13357:13439:13894:14181:14659:14721:21080:21434:21451:21627:30012:30054:30070: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:2,LUA_SUMMARY:none X-HE-Tag: face27_6d6d33b33c561 X-Filterd-Recvd-Size: 2135 Message-ID: <1498072750.3337.4.camel@perches.com> Subject: Re: [PATCH] net/sctp/ulpevent.c: Deinline sctp_ulpevent_set_owner, save 1616 bytes From: Joe Perches To: Denys Vlasenko , linux-kernel@vger.kernel.org Cc: Vlad Yasevich , Neil Horman , David Miller , linux-sctp@vger.kernel.org, netdev@vger.kernel.org Date: Wed, 21 Jun 2017 12:19:10 -0700 In-Reply-To: <20170621162809.4305-1-dvlasenk@redhat.com> References: <20170621162809.4305-1-dvlasenk@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1197 Lines: 33 On Wed, 2017-06-21 at 18:28 +0200, Denys Vlasenko wrote: > This function compiles to 147 bytes of machine code. 13 callsites. > > I'm no expert on SCTP events, but quick reading of SCTP docs tells me that > SCTP events are not happening on every packet. > They are ASSOC_CHANGE, PEER_ADDR_CHANGE, REMOTE_ERROR and such. > Does not look performance critical. Thanks. But: > diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c [] > @@ -88,7 +88,7 @@ int sctp_ulpevent_is_notification(const struct sctp_ulpevent *event) > /* Hold the association in case the msg_name needs read out of > * the association. > */ > -static inline void sctp_ulpevent_set_owner(struct sctp_ulpevent *event, > +static void sctp_ulpevent_set_owner(struct sctp_ulpevent *event, > const struct sctp_association *asoc) > { > struct sctp_chunk *chunk = event->chunk; This now misaligns the next line after the inline removal. Can you please run your patches through checkpatch? $ ./scripts/checkpatch.pl - CHECK: Alignment should match open parenthesis #86: FILE: net/sctp/ulpevent.c:92: +static void sctp_ulpevent_set_owner(struct sctp_ulpevent *event, ? ???const struct sctp_association *asoc)