mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joshua Abraham <j.abraham1776@gmail.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 10:12:30 +0300	[thread overview]
Message-ID: <20171201071230.tuygeqc7c2s4wazb@mwanda> (raw)
In-Reply-To: <20171130153948.GA29100@josharch>

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

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

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

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=20171201071230.tuygeqc7c2s4wazb@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=arnaud.patard@rtp-net.org \
    --cc=arushisinghal19971997@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=j.abraham1776@gmail.com \
    --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

all inboxes | Powered by JetHome®