Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208416
b: refs/heads/master
c: ecc3099
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed Aug 11, 2010
1 parent dffa01d commit 36a4ebb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3094141c6532a4f748425c21c091001f218da8ae
refs/heads/master: ecc3099002c1cc87e9e4b3dc5fdf7821828f6733
5 changes: 2 additions & 3 deletions trunk/drivers/scsi/aacraid/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,8 @@ static int aac_rx_check_health(struct aac_dev *dev)
pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS),
post, paddr);
if (likely((buffer[0] == '0') && ((buffer[1] == 'x') || (buffer[1] == 'X')))) {
ret = (buffer[2] <= '9') ? (buffer[2] - '0') : (buffer[2] - 'A' + 10);
ret <<= 4;
ret += (buffer[3] <= '9') ? (buffer[3] - '0') : (buffer[3] - 'A' + 10);
ret = (hex_to_bin(buffer[2]) << 4) +
hex_to_bin(buffer[3]);
}
pci_free_consistent(dev->pdev, 512, buffer, baddr);
return ret;
Expand Down
23 changes: 11 additions & 12 deletions trunk/drivers/scsi/lpfc/lpfc_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/interrupt.h>
#include <linux/aer.h>
#include <linux/gfp.h>
#include <linux/kernel.h>

#include <scsi/scsi.h>
#include <scsi/scsi_device.h>
Expand Down Expand Up @@ -1795,12 +1796,11 @@ lpfc_soft_wwpn_store(struct device *dev, struct device_attribute *attr,

/* Validate and store the new name */
for (i=0, j=0; i < 16; i++) {
if ((*buf >= 'a') && (*buf <= 'f'))
j = ((j << 4) | ((*buf++ -'a') + 10));
else if ((*buf >= 'A') && (*buf <= 'F'))
j = ((j << 4) | ((*buf++ -'A') + 10));
else if ((*buf >= '0') && (*buf <= '9'))
j = ((j << 4) | (*buf++ -'0'));
int value;

value = hex_to_bin(*buf++);
if (value >= 0)
j = (j << 4) | value;
else
return -EINVAL;
if (i % 2) {
Expand Down Expand Up @@ -1888,12 +1888,11 @@ lpfc_soft_wwnn_store(struct device *dev, struct device_attribute *attr,

/* Validate and store the new name */
for (i=0, j=0; i < 16; i++) {
if ((*buf >= 'a') && (*buf <= 'f'))
j = ((j << 4) | ((*buf++ -'a') + 10));
else if ((*buf >= 'A') && (*buf <= 'F'))
j = ((j << 4) | ((*buf++ -'A') + 10));
else if ((*buf >= '0') && (*buf <= '9'))
j = ((j << 4) | (*buf++ -'0'));
int value;

value = hex_to_bin(*buf++);
if (value >= 0)
j = (j << 4) | value;
else
return -EINVAL;
if (i % 2) {
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport.h>
Expand Down Expand Up @@ -1730,12 +1731,11 @@ fc_parse_wwn(const char *ns, u64 *nm)

/* Validate and store the new name */
for (i=0, j=0; i < 16; i++) {
if ((*ns >= 'a') && (*ns <= 'f'))
j = ((j << 4) | ((*ns++ -'a') + 10));
else if ((*ns >= 'A') && (*ns <= 'F'))
j = ((j << 4) | ((*ns++ -'A') + 10));
else if ((*ns >= '0') && (*ns <= '9'))
j = ((j << 4) | (*ns++ -'0'));
int value;

value = hex_to_bin(*ns++);
if (value >= 0)
j = (j << 4) | value;
else
return -EINVAL;
if (i % 2) {
Expand Down

0 comments on commit 36a4ebb

Please sign in to comment.