lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171201071230.tuygeqc7c2s4wazb@mwanda>
Date:   Fri, 1 Dec 2017 10:12:30 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Joshua Abraham <j.abraham1776@...il.com>
Cc:     arnaud.patard@...-net.org, arushisinghal19971997@...il.com,
        devel@...verdev.osuosl.org, mas@...kgp.ac.in,
        gregkh@...uxfoundation.org, karniksayli1995@...il.com,
        linux-kernel@...r.kernel.org, srishtishar@...il.com,
        kdunne@...l.ccsf.edu, sfaragnaus@...il.com
Subject: Re: [PATCH v2] staging: xgifb: remove macros with hidden variable

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ