linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Abraham <j.abraham1776@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
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
Date: Fri, 1 Dec 2017 08:15:40 -0500	[thread overview]
Message-ID: <20171201131540.GA22913@josharch> (raw)
In-Reply-To: <20171201071230.tuygeqc7c2s4wazb@mwanda>

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

      reply	other threads:[~2017-12-01 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 15:39 [PATCH v2] staging: xgifb: remove macros with hidden variable Joshua Abraham
2017-12-01  7:12 ` Dan Carpenter
2017-12-01 13:15   ` Josh Abraham [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171201131540.GA22913@josharch \
    --to=j.abraham1776@gmail.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=arushisinghal19971997@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=karniksayli1995@gmail.com \
    --cc=kdunne@mail.ccsf.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mas@iitkgp.ac.in \
    --cc=sfaragnaus@gmail.com \
    --cc=srishtishar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).