Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp235438ybb; Fri, 3 Apr 2020 01:33:21 -0700 (PDT) X-Google-Smtp-Source: APiQypLDV5BMNm+ISKfPGZFJO2KyHxJhyiQcNx34iMInBHpb8fJOPHAKVj0by4QnXjjZPDWh6NMP X-Received: by 2002:a9d:600f:: with SMTP id h15mr1507666otj.275.1585902801155; Fri, 03 Apr 2020 01:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585902801; cv=none; d=google.com; s=arc-20160816; b=PXMliODO1UcCUdV4mSMRRPJswMVJhbGtXR5WO7EcLf2CVKCdNa69YSAU3d2vLa31uS Mn0YPd9UTjzPGz7Qp2LtwS3T6WMMh9hEGSAaIHFPAhCZeEO+9ym+Ph49VcHcyaci+VjY sf1WccdMJUSD7xN/JHZvKTHNRsbTFSKndD8uRuu9sHndd4QqKDQjHrT7XdS/jopDvwc0 1yRTgFn91qlj5Yg6m57spvdPRT7v7+DFeQqNvkelgkTjq3ogrO9IWM2U91S9nakpalwk WfM84/b5LIpOpJDgsgNR6UmXy5pSxQWStaI4Pe9H0gw+xnnD0h3nAUIQL2bjQyKt7Y4W rVvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ss086libaRnicgxivCFTmSK24emVikB4VIk29pxOOEY=; b=tve0kUoFaMuuIXIXLvUSg/MY4wt9adf+8YppR/nPxPYbH0mRw4DwJWj7POHuBjI0QK kk9aVwEARwiz/FZbkWLHN+7FH/cjjj19V3cb22hPFNp/QQrzl+BG9+mP6Hv1IT5HZ5wC JvbPfWXHiA5hciaRVPE8Mu3l6E0kP8JQkQigkc9Kyr29TBaNSTEt4nasz4W1jUWEKBB8 o3MudtdVRQEp/EYuDh5fbb9ietkgdGMvLqYzPGSN4HlUFs6uF7WbL5hWsogvjepeFQJG S7g2xIR8NTkhAjo9Y7FpgIWH4fd+MaW+8nbSIc05OT1YW4HMCmK4KDNc73jeDzM7nIuv oVdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=vZd1D3Y7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si3287143oin.43.2020.04.03.01.33.08; Fri, 03 Apr 2020 01:33: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; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=vZd1D3Y7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389821AbgDCIco (ORCPT + 99 others); Fri, 3 Apr 2020 04:32:44 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:56112 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388482AbgDCIcn (ORCPT ); Fri, 3 Apr 2020 04:32:43 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0338OFmP055609; Fri, 3 Apr 2020 08:32:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=ss086libaRnicgxivCFTmSK24emVikB4VIk29pxOOEY=; b=vZd1D3Y7F64qs8Q8Cy649TJgKeHskxw5L8yLqRWz7J6FaoQOUJ9ODdwVZ2wK6Y24L2Aj OsLkQIcY+rYGXDB27HMp0FCNqP9zb+OUfqMk3lvoP+03eywzxU0+7qDzWYYJQhF2iwWs eBbuBJuiG/P7z6wUwX0ftzg+L4YKOSgGaw4Cq7ox8FAEo0zi1edAAqyNN4HNN3ww1UMS ceSRdPmgcn4pMcuOv8uFTAR02+SJ+xk/IAtmzhVHVmisEeL0wtd0E6W+cNO/cnvp57zl 9IJMlVvVJOc382Vrqiqa7cCf8HgvQIK5mZQERaCjaBP6y6g5CicrLgXkAecISe8jdknu tw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 303yunj9wt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Apr 2020 08:32:35 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0338WNeM052226; Fri, 3 Apr 2020 08:32:35 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 302g4x20dw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Apr 2020 08:32:35 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0338WXuW020986; Fri, 3 Apr 2020 08:32:33 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 03 Apr 2020 01:32:33 -0700 Date: Fri, 3 Apr 2020 11:32:25 +0300 From: Dan Carpenter To: "John B. Wyatt IV" Cc: outreachy-kernel@googlegroups.com, Rob Springer , Todd Poynor , Ben Chan , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] staging: gasket: Fix 4 over 80 char warnings Message-ID: <20200403083225.GX2001@kadam> References: <20200402053617.826678-1-jbwyatt4@gmail.com> <20200402053617.826678-2-jbwyatt4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402053617.826678-2-jbwyatt4@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9579 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004030072 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9579 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004030071 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 01, 2020 at 10:36:16PM -0700, John B. Wyatt IV wrote: > Fix 4 over 80 char warnings by caching long enum values into local > variables. > > All enums are only used once inside each function (and once inside > the entire file). > > Reported by checkpatch. > > Signed-off-by: John B. Wyatt IV > --- > drivers/staging/gasket/apex_driver.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c > index 46199c8ca441..f48209ec7d24 100644 > --- a/drivers/staging/gasket/apex_driver.c > +++ b/drivers/staging/gasket/apex_driver.c > @@ -253,6 +253,8 @@ static int apex_get_status(struct gasket_dev *gasket_dev) > /* Enter GCB reset state. */ > static int apex_enter_reset(struct gasket_dev *gasket_dev) > { > + int idle_gen_reg = APEX_BAR2_REG_IDLEGENERATOR_IDLEGEN_IDLEREGISTER; > + Sorry, but I also hate these where we have a one time use temporary variable to get around the 80 character rule. Generally, avoid pointless indirection. The original code is better. regards, dan carpenter