Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752913AbdLANPw (ORCPT ); Fri, 1 Dec 2017 08:15:52 -0500 Received: from mail-yw0-f193.google.com ([209.85.161.193]:41161 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752777AbdLANPp (ORCPT ); Fri, 1 Dec 2017 08:15:45 -0500 X-Google-Smtp-Source: AGs4zMbGonlcl0mjuVBKL1oaX5+zhXzN8+3SZBWbskx2fD//DVknYNpmkpzj7SgUIG9naho4xrRG5g== Date: Fri, 1 Dec 2017 08:15:40 -0500 From: Josh Abraham To: Dan Carpenter Cc: arnaud.patard@rtp-net.org, arushisinghal19971997@gmail.com, devel@driverdev.osuosl.org, mas@iitkgp.ac.in, gregkh@linuxfoundation.org, karniksayli1995@gmail.com, linux-kernel@vger.kernel.org, srishtishar@gmail.com, kdunne@mail.ccsf.edu, sfaragnaus@gmail.com Subject: Re: [PATCH v2] staging: xgifb: remove macros with hidden variable Message-ID: <20171201131540.GA22913@josharch> References: <20171130153948.GA29100@josharch> <20171201071230.tuygeqc7c2s4wazb@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171201071230.tuygeqc7c2s4wazb@mwanda> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1061 Lines: 32 On Fri, Dec 01, 2017 at 10:12:30AM +0300, Dan Carpenter wrote: > On Thu, Nov 30, 2017 at 10:39:48AM -0500, Joshua Abraham wrote: > > diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c > > index 6feecc55d2bc..6de66eaad96b 100644 > > --- a/drivers/staging/xgifb/XGI_main_26.c > > +++ b/drivers/staging/xgifb/XGI_main_26.c > > @@ -34,16 +34,16 @@ static void dumpVGAReg(struct xgifb_video_info *xgifb_info) > > { > > u8 i, reg; > > > > - xgifb_reg_set(XGISR, 0x05, 0x86); > > + xgifb_reg_set(xgifb_info->dev_info.P3c4, 0x05, 0x86); > > This patch is OK, but it might be nicer to create a temporary variable > so the lines are not so long: > > struct vb_device_info *vb = &xgifb_info->dev_info; > u8 i, reg; > > xgifb_reg_set(vb->P3c4, 0x05, 0x86); > > I chose "vb" based on the struct name... "dev" and "info" aren't very > useful in a name because there are a lot of devices and lots of types > of info. > > regards, > dan carpneter > That is indeed MUCH more readable. Thanks, I'll work on this today. -Josh