Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp315512yba; Sat, 30 Mar 2019 23:42:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyijWcY6o8TwU9mdHH8Ju/hAhHgYpHF7fX/4ulSoiaOLTDpAiEXgNy+NX9CX7mZ6Qo0G0OP X-Received: by 2002:aa7:8453:: with SMTP id r19mr28714811pfn.44.1554014541438; Sat, 30 Mar 2019 23:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554014541; cv=none; d=google.com; s=arc-20160816; b=svl5InBPVp+BkbP965Y3IK9azSd7R1jtqlCI4HH7vw49APqeh4Yd23Tc8LSkzrXBXb 8EEOKOBQex16EdTqU0Wn3UXsizM4ZwxGp0CIYHmvfhGKWPQUylD2frdz5Ls6xVvL7Evr IZC7cnkitJKBo+nl2xGlLRe+JgTM8GnHnI7W+k4mXBvjk7iu+sp/4SSXa9IJ3lLVqLK1 1YfymEYqQT0Lt5rYNXuGdqRXWzGUI5qne3km4p9g94Nz11I6U3NVnZGVZthIu7KGlISB eKkZbLb/bYpZBbDw8U6OVA/aB2xSAU5jL9y/y+0I27XPZeKWWSFsW7g8eFEi14iXPe2s eXsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=/9etFq+p4wXVAGfwXoxmz7hLKEI3rtKCRZZzXcew3xM=; b=UkE1VNxipZugcPOz2pnj9jixxHZBRXNYqDbq9PFthMY9EbzkWka6069ySY3NHznKvC iVYrAsyr7ASvmh4Wu/Rp2B7FfYeb+QX1KSmtbsDmw6zzEooslZhiuC7e5S7A4fQVvjWt XOzkfqows90oUvgadAzqT13wGJ83F+lN3+TSyrLmfIvctnlAVu8kXhkrwc8likThd2+o B45Q7QP9vNCaVcfL+5DKmR/4RNbjEslNvwpyIAHn12Qy0lIodY0JYhuH9yOPacxUH7gG Q6gi6/IW1EvxgcBdaY+trxps+UyVna0JrFSX88L6DMdvsUbNSBnl0mGoVraLBGryGUnR SJNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si5849036pgt.357.2019.03.30.23.42.06; Sat, 30 Mar 2019 23:42:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727027AbfCaGlD (ORCPT + 99 others); Sun, 31 Mar 2019 02:41:03 -0400 Received: from smtprelay0251.hostedemail.com ([216.40.44.251]:48962 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726905AbfCaGlB (ORCPT ); Sun, 31 Mar 2019 02:41:01 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 37097100E86C2; Sun, 31 Mar 2019 06:41:00 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:599:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3872:3874:4321:5007:10004:10400:10848:11026:11232:11658:11914:12043:12438:12740:12760:12895:13069:13311:13357:13439:14096:14097:14659:14721:21080:21324:21451:21627:30012:30054:30080:30091,0,RBL:172.58.35.144:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: sheep33_42bb214506e16 X-Filterd-Recvd-Size: 1879 Received: from XPS-9350 (unknown [172.58.35.144]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Sun, 31 Mar 2019 06:40:58 +0000 (UTC) Message-ID: <8b6afee25fe6d2248353015fe2303d793b2a1d49.camel@perches.com> Subject: Re: [greybus-dev] [PATCH] Staging: greybus: usb: Fixed a coding style error From: Joe Perches To: Alex Elder , Will Cunningham , johan@kernel.org Cc: devel@driverdev.osuosl.org, elder@kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org Date: Sat, 30 Mar 2019 23:40:28 -0700 In-Reply-To: <5c95c177-b8fe-ab0b-eb7a-d270e35a7ce6@linaro.org> References: <20190331053040.GA12974@titus.pi.local> <41750e16d14a967529d7cb5e315110ee5ccd313c.camel@perches.com> <5c95c177-b8fe-ab0b-eb7a-d270e35a7ce6@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-03-31 at 01:20 -0500, Alex Elder wrote: > On 3/31/19 1:04 AM, Joe Perches wrote: > > Blind adherence to 80 column limits leads to poor looking > > code. Especially with longish identifier lengths. > I agree. If it were me, I'd use a local variable. For example: > > struct greybus_descriptor_cport *cport_desc = gbphy_dev->cport_desc; > ... > connection = gb_connection_create(gbphy_dev->bundle, > le16_to_cpu(cport_desc->id), NULL); > > Or maybe better: > > u16 cport_id = le16_to_cpu(gbphy_dev->cport_desc->id); > ... > connection = gb_connection_create(gbphy_dev->bundle, cport_id, NULL); True. A possible negative though: Temporaries that are only used once are sometimes less readable as the declaration is supposed to be done at an open brace and that could be relatively far away from the set and use.