From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751717AbdJESAh (ORCPT ); Thu, 5 Oct 2017 14:00:37 -0400 Received: from smtprelay0125.hostedemail.com ([216.40.44.125]:46381 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751332AbdJESAf (ORCPT ); Thu, 5 Oct 2017 14:00:35 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960: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:2692:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3871:3872:3873:4321:5007:6119:6691:7903:10004:10400:10848:11232:11658:11914:12296:12663:12679:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:21080:21627:30012:30036:30054:30060: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:2,LUA_SUMMARY:none X-HE-Tag: low76_3f0f2333eef1d X-Filterd-Recvd-Size: 1768 Message-ID: <1507226431.4434.37.camel@perches.com> Subject: Re: [PATCH] staging: ccree: local variable "dev" not required From: Joe Perches To: Gilad Ben-Yossef , Suniel Mahesh Cc: Greg Kroah-Hartman , Linux Crypto Mailing List , driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, Linux kernel mailing list , karthik@techveda.org Date: Thu, 05 Oct 2017 11:00:31 -0700 In-Reply-To: References: <1507144330-1672-1-git-send-email-sunil.m@techveda.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-10-05 at 10:07 +0300, Gilad Ben-Yossef wrote: > On Wed, Oct 4, 2017 at 10:12 PM, wrote: > > There is no need to create a local pointer variable "dev" and > > pass it various API's, instead use plat_dev which is enumerated > > by platform core on successful probe. [] > I'm sorry but I don't understand what is the problem you are trying to solve or > what is the improvement suggested. > > Why is having a local variable undesirable? I think having it makes > the code more readable, not less. IMO: The local variable is _not_ undesirable. It does make the code more readable and shortens line lengths too.