Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
On Thu, 2012-11-15 at 15:24 +0800, NickCheng wrote: From: Nick Cheng nick.ch...@areca.com.tw Replace the nameing, hba, hbb and hbc, with hbaA, hbaB abd hbaC respectively Signed-off-by: Nick Cheng nick.ch...@areca.com.tw I can apply this with manual fixups because of the double // in the diff: diff -uprN a//drivers/scsi/arcmsr/arcmsr_attr.c b//drivers/scsi/arcmsr/arcmsr_attr.c --- a//drivers/scsi/arcmsr/arcmsr_attr.c2012-10-11 17:45:19.397738033 +0800 +++ b//drivers/scsi/arcmsr/arcmsr_attr.c2012-10-12 16:22:28.147962534 +0800 But come on, Nick, please, you can do better than this: checkpatch.pl is incredibly unhappy (please fix): ERROR: trailing whitespace #51: FILE: drivers/scsi/arcmsr/arcmsr.h:66: +#define ARCMSR_CDB_SG_PAGE_LENGTH^I^I256 $ ERROR: Macros with complex values should be enclosed in parenthesis #72: FILE: drivers/scsi/arcmsr/arcmsr.h:82: +#define dma_addr_hi32(addr)(uint32_t) ((addr16)16) ERROR: Macros with complex values should be enclosed in parenthesis #73: FILE: drivers/scsi/arcmsr/arcmsr.h:83: +#define dma_addr_lo32(addr)(uint32_t) (addr 0x) WARNING: please, no spaces at the start of a line #82: FILE: drivers/scsi/arcmsr/arcmsr.h:92: + uint8_t Signature[8];$ ERROR: Macros with complex values should be enclosed in parenthesis #119: FILE: drivers/scsi/arcmsr/arcmsr.h:125: +#define ARCMSR_MESSAGE_READ_RQBUFFER \ ARECA_SATA_RAID | FUNCTION_READ_RQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #122: FILE: drivers/scsi/arcmsr/arcmsr.h:127: +#define ARCMSR_MESSAGE_WRITE_WQBUFFER \ ARECA_SATA_RAID | FUNCTION_WRITE_WQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #125: FILE: drivers/scsi/arcmsr/arcmsr.h:129: +#define ARCMSR_MESSAGE_CLEAR_RQBUFFER \ ARECA_SATA_RAID | FUNCTION_CLEAR_RQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #128: FILE: drivers/scsi/arcmsr/arcmsr.h:131: +#define ARCMSR_MESSAGE_CLEAR_WQBUFFER \ ARECA_SATA_RAID | FUNCTION_CLEAR_WQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #131: FILE: drivers/scsi/arcmsr/arcmsr.h:133: +#define ARCMSR_MESSAGE_CLEAR_ALLQBUFFER\ ARECA_SATA_RAID | FUNCTION_CLEAR_ALLQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #134: FILE: drivers/scsi/arcmsr/arcmsr.h:135: +#define ARCMSR_MESSAGE_RETURN_CODE_3F \ ARECA_SATA_RAID | FUNCTION_RETURN_CODE_3F ERROR: Macros with complex values should be enclosed in parenthesis #137: FILE: drivers/scsi/arcmsr/arcmsr.h:137: +#define ARCMSR_MESSAGE_SAY_HELLO \ ARECA_SATA_RAID | FUNCTION_SAY_HELLO ERROR: Macros with complex values should be enclosed in parenthesis #140: FILE: drivers/scsi/arcmsr/arcmsr.h:139: +#define ARCMSR_MESSAGE_SAY_GOODBYE \ ARECA_SATA_RAID | FUNCTION_SAY_GOODBYE ERROR: Macros with complex values should be enclosed in parenthesis #143: FILE: drivers/scsi/arcmsr/arcmsr.h:141: +#define ARCMSR_MESSAGE_FLUSH_ADAPTER_CACHE \ ARECA_SATA_RAID | FUNCTION_FLUSH_ADAPTER_CACHE ERROR: trailing whitespace #217: FILE: drivers/scsi/arcmsr/arcmsr.h:194: +^Iuint32_t cfgPicStatus;^I/*30, 120-123*/^I$ ERROR: open brace '{' following struct go on the same line #651: FILE: drivers/scsi/arcmsr/arcmsr.h:429: +struct MessageUnit_C +{ ERROR: trailing whitespace #871: FILE: drivers/scsi/arcmsr/arcmsr.h:588: +^Iuint32_t firm_cfg_version;^I$ ERROR: open brace '{' following struct go on the same line #909: FILE: drivers/scsi/arcmsr/arcmsr.h:608: +struct CommandControlBlock +{ ERROR: trailing whitespace #921: FILE: drivers/scsi/arcmsr/arcmsr.h:620: +^I#define CCB_FLAG_MASTER_ABORTED^I0x0008^I$ ERROR: code indent should use tabs where possible #1006: FILE: drivers/scsi/arcmsr/arcmsr.h:674: + ^I|ARCMSR_MU_OUTBOUND_MESSAGE1_INT^I\$ WARNING: please, no space before tabs #1006: FILE: drivers/scsi/arcmsr/arcmsr.h:674: + ^I|ARCMSR_MU_OUTBOUND_MESSAGE1_INT^I\$ WARNING: please, no spaces at the start of a line #1006: FILE: drivers/scsi/arcmsr/arcmsr.h:674: + ^I|ARCMSR_MU_OUTBOUND_MESSAGE1_INT^I\$ ERROR: space required after that ',' (ctx:VxV) #1088: FILE: drivers/scsi/arcmsr/arcmsr_attr.c:119: + struct device *dev = container_of(kobj,struct device, kobj); ^ ERROR: space required after that ',' (ctx:VxV) #1401: FILE: drivers/scsi/arcmsr/arcmsr_hba.c:194: + acb-pmuA = ioremap(pci_resource_start(pdev,0), ^ ERROR: space required after that ',' (ctx:VxV) #1402: FILE: drivers/scsi/arcmsr/arcmsr_hba.c:195: + pci_resource_len(pdev,0)); ^ WARNING: Prefer netdev_notice(netdev, ... then dev_notice(dev, ... then pr_notice(... to printk(KERN_NOTICE ... #1405: FILE:
Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
Hi James, You got these errors/warnings before or after you apply these 5 patches? Thanks, 2012/11/15 James Bottomley james.bottom...@hansenpartnership.com: On Thu, 2012-11-15 at 15:24 +0800, NickCheng wrote: From: Nick Cheng nick.ch...@areca.com.tw Replace the nameing, hba, hbb and hbc, with hbaA, hbaB abd hbaC respectively Signed-off-by: Nick Cheng nick.ch...@areca.com.tw I can apply this with manual fixups because of the double // in the diff: diff -uprN a//drivers/scsi/arcmsr/arcmsr_attr.c b//drivers/scsi/arcmsr/arcmsr_attr.c --- a//drivers/scsi/arcmsr/arcmsr_attr.c2012-10-11 17:45:19.397738033 +0800 +++ b//drivers/scsi/arcmsr/arcmsr_attr.c2012-10-12 16:22:28.147962534 +0800 But come on, Nick, please, you can do better than this: checkpatch.pl is incredibly unhappy (please fix): ERROR: trailing whitespace #51: FILE: drivers/scsi/arcmsr/arcmsr.h:66: +#define ARCMSR_CDB_SG_PAGE_LENGTH^I^I256 $ ERROR: Macros with complex values should be enclosed in parenthesis #72: FILE: drivers/scsi/arcmsr/arcmsr.h:82: +#define dma_addr_hi32(addr)(uint32_t) ((addr16)16) ERROR: Macros with complex values should be enclosed in parenthesis #73: FILE: drivers/scsi/arcmsr/arcmsr.h:83: +#define dma_addr_lo32(addr)(uint32_t) (addr 0x) WARNING: please, no spaces at the start of a line #82: FILE: drivers/scsi/arcmsr/arcmsr.h:92: + uint8_t Signature[8];$ ERROR: Macros with complex values should be enclosed in parenthesis #119: FILE: drivers/scsi/arcmsr/arcmsr.h:125: +#define ARCMSR_MESSAGE_READ_RQBUFFER \ ARECA_SATA_RAID | FUNCTION_READ_RQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #122: FILE: drivers/scsi/arcmsr/arcmsr.h:127: +#define ARCMSR_MESSAGE_WRITE_WQBUFFER \ ARECA_SATA_RAID | FUNCTION_WRITE_WQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #125: FILE: drivers/scsi/arcmsr/arcmsr.h:129: +#define ARCMSR_MESSAGE_CLEAR_RQBUFFER \ ARECA_SATA_RAID | FUNCTION_CLEAR_RQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #128: FILE: drivers/scsi/arcmsr/arcmsr.h:131: +#define ARCMSR_MESSAGE_CLEAR_WQBUFFER \ ARECA_SATA_RAID | FUNCTION_CLEAR_WQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #131: FILE: drivers/scsi/arcmsr/arcmsr.h:133: +#define ARCMSR_MESSAGE_CLEAR_ALLQBUFFER\ ARECA_SATA_RAID | FUNCTION_CLEAR_ALLQBUFFER ERROR: Macros with complex values should be enclosed in parenthesis #134: FILE: drivers/scsi/arcmsr/arcmsr.h:135: +#define ARCMSR_MESSAGE_RETURN_CODE_3F \ ARECA_SATA_RAID | FUNCTION_RETURN_CODE_3F ERROR: Macros with complex values should be enclosed in parenthesis #137: FILE: drivers/scsi/arcmsr/arcmsr.h:137: +#define ARCMSR_MESSAGE_SAY_HELLO \ ARECA_SATA_RAID | FUNCTION_SAY_HELLO ERROR: Macros with complex values should be enclosed in parenthesis #140: FILE: drivers/scsi/arcmsr/arcmsr.h:139: +#define ARCMSR_MESSAGE_SAY_GOODBYE \ ARECA_SATA_RAID | FUNCTION_SAY_GOODBYE ERROR: Macros with complex values should be enclosed in parenthesis #143: FILE: drivers/scsi/arcmsr/arcmsr.h:141: +#define ARCMSR_MESSAGE_FLUSH_ADAPTER_CACHE \ ARECA_SATA_RAID | FUNCTION_FLUSH_ADAPTER_CACHE ERROR: trailing whitespace #217: FILE: drivers/scsi/arcmsr/arcmsr.h:194: +^Iuint32_t cfgPicStatus;^I/*30, 120-123*/^I$ ERROR: open brace '{' following struct go on the same line #651: FILE: drivers/scsi/arcmsr/arcmsr.h:429: +struct MessageUnit_C +{ ERROR: trailing whitespace #871: FILE: drivers/scsi/arcmsr/arcmsr.h:588: +^Iuint32_t firm_cfg_version;^I$ ERROR: open brace '{' following struct go on the same line #909: FILE: drivers/scsi/arcmsr/arcmsr.h:608: +struct CommandControlBlock +{ ERROR: trailing whitespace #921: FILE: drivers/scsi/arcmsr/arcmsr.h:620: +^I#define CCB_FLAG_MASTER_ABORTED^I0x0008^I$ ERROR: code indent should use tabs where possible #1006: FILE: drivers/scsi/arcmsr/arcmsr.h:674: + ^I|ARCMSR_MU_OUTBOUND_MESSAGE1_INT^I\$ WARNING: please, no space before tabs #1006: FILE: drivers/scsi/arcmsr/arcmsr.h:674: + ^I|ARCMSR_MU_OUTBOUND_MESSAGE1_INT^I\$ WARNING: please, no spaces at the start of a line #1006: FILE: drivers/scsi/arcmsr/arcmsr.h:674: + ^I|ARCMSR_MU_OUTBOUND_MESSAGE1_INT^I\$ ERROR: space required after that ',' (ctx:VxV) #1088: FILE: drivers/scsi/arcmsr/arcmsr_attr.c:119: + struct device *dev = container_of(kobj,struct device, kobj); ^ ERROR: space required after that ',' (ctx:VxV) #1401: FILE: drivers/scsi/arcmsr/arcmsr_hba.c:194: + acb-pmuA = ioremap(pci_resource_start(pdev,0), ^ ERROR: space required after that ',' (ctx:VxV) #1402: FILE: drivers/scsi/arcmsr/arcmsr_hba.c:195: +
Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
On Thu, 2012-11-15 at 22:53 +0800, 鄭守謙 wrote: Hi James, You got these errors/warnings before or after you apply these 5 patches? I got all of this lot from patch 1/5 only. Please fix at least the errors and the warnings that go to whitespace issues. I don't really care about printk(KERN_ERR vs pr_err( or lines over 80 characters. James -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
OK. I will fix it. Thank you, 2012/11/15 James Bottomley james.bottom...@hansenpartnership.com: On Thu, 2012-11-15 at 22:53 +0800, 鄭守謙 wrote: Hi James, You got these errors/warnings before or after you apply these 5 patches? I got all of this lot from patch 1/5 only. Please fix at least the errors and the warnings that go to whitespace issues. I don't really care about printk(KERN_ERR vs pr_err( or lines over 80 characters. James -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
On Fri, 2012-10-12 at 17:05 +0800, NickCheng wrote: -#define ARCMSR_HBCMU_OUTBOUND_DOORBELL_ISR_MASK0x0004 /* When clear, the General Outbound Doorbell interrupt routes to the host.*/ The patch is still linebroken here. It is a massively long line (like about 200 characters). I suspect you just set your exchange server line break to something big, but not bigger than this? James -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
On Wed, 2012-10-03 at 20:39 +0800, NickCheng wrote: From: Nick Cheng nick.ch...@areca.com.tw Replace the nameing, hba, hbb and hbc, with hbaA, hbaB abd hbaC respectively Signed-off-by: Nick Cheng nick.ch...@areca.com.tw --- diff -uprN -X linux-vanilla/Documentation/dontdiff linux-vanilla//drivers/scsi/arcmsr/arcmsr.h linux-development//drivers/scsi/arcmsr/arcmsr.h --- linux-vanilla//drivers/scsi/arcmsr/arcmsr.h 2012-10-03 18:29:18.030657090 +0800 +++ linux-development//drivers/scsi/arcmsr/arcmsr.h 2012-10-03 18:43:58.542648536 +0800 This patch is linebroken and can't be applied. Whatever mail tool you're using must have broken the lines. Please see Documentation/email-clients.txt About how to fix this and resubmit. Thanks, James @@ -51,7 +51,7 @@ struct device_attribute; #else #define ARCMSR_MAX_FREECCB_NUM 320 #endif -#define ARCMSR_DRIVER_VERSION Driver Version 1.20.00.15 2010/08/05 +#define ARCMSR_DRIVER_VERSION Driver Version 1.20.00.15 2012/09/30 #define ARCMSR_SCSI_INITIATOR_ID 255 #define ARCMSR_MAX_XFER_SECTORS 512 #define ARCMSR_MAX_XFER_SECTORS_B 4096 diff -uprN -X linux-vanilla/Documentation/dontdiff linux-vanilla//drivers/scsi/arcmsr/arcmsr_hba.c linux-development//drivers/scsi/arcmsr/arcmsr_hba.c --- linux-vanilla//drivers/scsi/arcmsr/arcmsr_hba.c 2012-10-03 18:29:18.030657090 +0800 +++ linux-development//drivers/scsi/arcmsr/arcmsr_hba.c 2012-10-03 18:43:58.542648536 +0800 @@ -61,6 +61,7 @@ #include linux/aer.h #include asm/dma.h #include asm/io.h +#include asm/system.h #include asm/uaccess.h #include scsi/scsi_host.h #include scsi/scsi.h @@ -95,16 +96,16 @@ static void arcmsr_iop_init(struct Adapt static void arcmsr_free_ccb_pool(struct AdapterControlBlock *acb); static u32 arcmsr_disable_outbound_ints(struct AdapterControlBlock *acb); static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb); -static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb); -static void arcmsr_flush_hbb_cache(struct AdapterControlBlock *acb); +static void arcmsr_hbaA_flush_cache(struct AdapterControlBlock *acb); +static void arcmsr_hbaB_flush_cache(struct AdapterControlBlock *acb); static void arcmsr_request_device_map(unsigned long pacb); -static void arcmsr_request_hba_device_map(struct AdapterControlBlock *acb); -static void arcmsr_request_hbb_device_map(struct AdapterControlBlock *acb); -static void arcmsr_request_hbc_device_map(struct AdapterControlBlock *acb); +static void arcmsr_hbaA_request_device_map(struct AdapterControlBlock *acb); +static void arcmsr_hbaB_request_device_map(struct AdapterControlBlock *acb); +static void arcmsr_hbaC_request_device_map(struct AdapterControlBlock *acb); static void arcmsr_message_isr_bh_fn(struct work_struct *work); static bool arcmsr_get_firmware_spec(struct AdapterControlBlock *acb); static void arcmsr_start_adapter_bgrb(struct AdapterControlBlock *acb); -static void arcmsr_hbc_message_isr(struct AdapterControlBlock *pACB); +static void arcmsr_hbaC_message_isr(struct AdapterControlBlock *pACB); static void arcmsr_hardware_reset(struct AdapterControlBlock *acb); static const char *arcmsr_info(struct Scsi_Host *); static irqreturn_t arcmsr_interrupt(struct AdapterControlBlock *acb); @@ -308,7 +309,7 @@ static void arcmsr_define_adapter_type(s } } -static uint8_t arcmsr_hba_wait_msgint_ready(struct AdapterControlBlock *acb) +static uint8_t arcmsr_hbaA_wait_msgint_ready(struct AdapterControlBlock *acb) { struct MessageUnit_A __iomem *reg = acb-pmuA; int i; @@ -326,7 +327,7 @@ static uint8_t arcmsr_hba_wait_msgint_re return false; } -static uint8_t arcmsr_hbb_wait_msgint_ready(struct AdapterControlBlock *acb) +static uint8_t arcmsr_hbaB_wait_msgint_ready(struct AdapterControlBlock *acb) { struct MessageUnit_B *reg = acb-pmuB; int i; @@ -346,7 +347,7 @@ static uint8_t arcmsr_hbb_wait_msgint_re return false; } -static uint8_t arcmsr_hbc_wait_msgint_ready(struct AdapterControlBlock *pACB) +static uint8_t arcmsr_hbaC_wait_msgint_ready(struct AdapterControlBlock *pACB) { struct MessageUnit_C *phbcmu = (struct MessageUnit_C *)pACB-pmuC; int i; @@ -364,13 +365,13 @@ static uint8_t arcmsr_hbc_wait_msgint_re return false; } -static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb) +static void arcmsr_hbaA_flush_cache(struct AdapterControlBlock *acb) { struct MessageUnit_A __iomem *reg = acb-pmuA; int retry_count = 30; writel(ARCMSR_INBOUND_MESG0_FLUSH_CACHE, reg-inbound_msgaddr0); do { - if (arcmsr_hba_wait_msgint_ready(acb)) + if (arcmsr_hbaA_wait_msgint_ready(acb)) break; else { retry_count--; @@ -380,13 +381,13 @@ static void arcmsr_flush_hba_cache(struc
Re: [PATCH 1/5] arcmsr: Re-name the HBA Type
On Tue, 2012-10-09 at 21:23 +0800, NickCheng wrote: From: Nick Cheng nick.ch...@areca.com.tw Replace the nameing, hba, hbb and hbc, with hbaA, hbaB abd hbaC respectively Signed-off-by: Nick Cheng nick.ch...@areca.com.tw This is still malformed in exactly the same way diff -uprN -X linux-vanilla/Documentation/dontdiff linux-vanilla//drivers/scsi/arcmsr/arcmsr.h linux-development//drivers/scsi/arcmsr/arcmsr.h --- linux-vanilla//drivers/scsi/arcmsr/arcmsr.h 2012-10-03 There's a spurious carriage return here which kills the patch applicability 18:29:18.030657090 +0800 James -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html