RE: [PATCH] mtip32xx: remove unused variables from mtip32xx.c

2012-10-31 Thread yongjun_...@trendmicro.com.cn
Hi all

Sorry, please ignore this mail, this mail just be resend by my mistake.

Regards,
Yongjun Wei

-Original Message-
From: Wei Yongjun [mailto:weiyj...@gmail.com] 
Sent: 2012年11月1日 13:09
To: ax...@kernel.dk
Cc: Yongjun Wei (RD-CN); linux-kernel@vger.kernel.org
Subject: [PATCH] mtip32xx: remove unused variables from mtip32xx.c

From: Wei Yongjun 

The variables fis, reply are initialized but never used otherwise, so remove 
the unused variables.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun 
---
 drivers/block/mtip32xx/mtip32xx.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c 
b/drivers/block/mtip32xx/mtip32xx.c
index adc6f36..d1e0273 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -555,7 +555,6 @@ static void print_tags(struct driver_data *dd,  static void 
mtip_timeout_function(unsigned long int data)  {
struct mtip_port *port = (struct mtip_port *) data;
-   struct host_to_dev_fis *fis;
struct mtip_cmd *command;
int tag, cmdto_cnt = 0;
unsigned int bit, group;
@@ -587,7 +586,6 @@ static void mtip_timeout_function(unsigned long int data)
bit = tag & 0x1F;
 
command = &port->commands[tag];
-   fis = (struct host_to_dev_fis *) command->command;
 
set_bit(tag, tagaccum);
cmdto_cnt++;
@@ -1142,10 +1140,8 @@ static void mtip_issue_non_ncq_command(struct mtip_port 
*port, int tag)  static bool mtip_pause_ncq(struct mtip_port *port,
struct host_to_dev_fis *fis)
 {
-   struct host_to_dev_fis *reply;
unsigned long task_file_data;
 
-   reply = port->rxfis + RX_FIS_D2H_REG;
task_file_data = readl(port->mmio+PORT_TFDATA);
 
if (fis->command == ATA_CMD_SEC_ERASE_UNIT)




TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.


RE: [PATCH] block: move the dereference below the NULL test

2012-09-07 Thread yongjun_...@trendmicro.com.cn
Sorry, I see the patch fix this issue has already exists in the maillist,
please ignore it, thanks.

-Original Message-
From: Wei Yongjun [mailto:weiyj...@gmail.com] 
Sent: 2012年9月7日 15:04
To: grant.lik...@secretlab.ca; rob.herr...@calxeda.com
Cc: Yongjun Wei (RD-CN); linux-kernel@vger.kernel.org; 
devicetree-disc...@lists.ozlabs.org
Subject: [PATCH] block: move the dereference below the NULL test

From: Wei Yongjun 

The dereference should be moved below the NULL test.

spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)



TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential and 
may be subject to copyright or other intellectual property protection. If you 
are not the intended recipient, you are not authorized to use or disclose this 
information, and we request that you notify us by reply mail or telephone and 
delete the original message from your mail 
system.N�Р骒r��yb�X�肚�v�^�)藓{.n�+�伐�{��赙zXФ�≤�}��财�z�&j:+v�����赙zZ+��+zf"�h���~i���z��wア�?�ㄨ��&�)撷f��^j谦y�m��@A�a囤�
0鹅h���i

RE: [PATCH -next] audit: remove duplicated include from audit.c

2013-04-11 Thread yongjun_...@trendmicro.com.cn
Hi Eric,

Sorry reply on top.

From the source code from linex-next.git tree, line 55~64:

#include 
#include ***
#include 
#ifdef CONFIG_SECURITY
#include 
#endif
#include ***
#include 
#include 
#include 

net/netlink.h is included twice, and linux/netlink.h is not included by this 
file.

-Original Message-
From: Eric Paris [mailto:epa...@redhat.com] 
Sent: 2013年4月11日 1:26
To: Wei Yongjun
Cc: v...@zeniv.linux.org.uk; Yongjun Wei (RD-CN); linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c

net/netlink.h includes linux/netlink.h but linux/netlink.h does not include 
net/netlink.h

since the audit code uses the nlmsg_* functions provided in net/netlink.h it 
seems we need this include.

since the audit code uses netlink_unicast provided in linux/netlink.h it seems 
we need that include.

I don't see duplication even if by chance one of them would have included the 
other...

- Original Message -
> From: Wei Yongjun 
> 
> Remove duplicated include.
> 
> Signed-off-by: Wei Yongjun 
> ---
>  kernel/audit.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c index 488f85f..9377913 
> 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -58,7 +58,6 @@
>  #ifdef CONFIG_SECURITY
>  #include 
>  #endif
> -#include 
>  #include 
>  #include 
>  #include 
> 
> 


TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.