[PATCH v6 26/37] cxlflash: Correct spelling, grammar, and alignment mistakes

2015-10-21 Thread Matthew R. Ochs
There are several spelling and grammar mistakes throughout the
driver. Additionally there are a handful of places where there
are extra lines and unnecessary variables/statements. These are
a nuisance and pollute the driver.

Fix spelling and grammar issues. Update some comments for clarity and
consistency. Remove extra lines and a few unneeded variables/statements.

Signed-off-by: Matthew R. Ochs 
Signed-off-by: Manoj N. Kumar 
Reviewed-by: Brian King 
Reviewed-by: Andrew Donnellan 
---
 drivers/scsi/cxlflash/common.h|  2 --
 drivers/scsi/cxlflash/main.c  | 62 +--
 drivers/scsi/cxlflash/sislite.h   |  6 ++--
 drivers/scsi/cxlflash/superpipe.c |  2 +-
 drivers/scsi/cxlflash/vlun.c  | 14 -
 5 files changed, 38 insertions(+), 48 deletions(-)

diff --git a/drivers/scsi/cxlflash/common.h b/drivers/scsi/cxlflash/common.h
index a810585..bbfe711 100644
--- a/drivers/scsi/cxlflash/common.h
+++ b/drivers/scsi/cxlflash/common.h
@@ -105,8 +105,6 @@ struct cxlflash_cfg {
atomic_t scan_host_needed;
 
struct cxl_afu *cxl_afu;
-
-   struct pci_pool *cxlflash_cmd_pool;
struct pci_dev *parent_dev;
 
atomic_t recovery_threads;
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 14fb9b4..eeb1c47 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -34,7 +34,6 @@ MODULE_AUTHOR("Manoj N. Kumar ");
 MODULE_AUTHOR("Matthew R. Ochs ");
 MODULE_LICENSE("GPL");
 
-
 /**
  * cmd_checkout() - checks out an AFU command
  * @afu:   AFU to checkout from.
@@ -730,7 +729,7 @@ static void cxlflash_remove(struct pci_dev *pdev)
case INIT_STATE_SCSI:
cxlflash_term_local_luns(cfg);
scsi_remove_host(cfg->host);
-   /* Fall through */
+   /* fall through */
case INIT_STATE_AFU:
term_afu(cfg);
cancel_work_sync(&cfg->work_q);
@@ -763,9 +762,7 @@ static int alloc_mem(struct cxlflash_cfg *cfg)
char *buf = NULL;
struct device *dev = &cfg->dev->dev;
 
-   /* This allocation is about 12K, i.e. only 1 64k page
-* and upto 4 4k pages
-*/
+   /* AFU is ~12k, i.e. only one 64k page or up to four 4k pages */
cfg->afu = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
get_order(sizeof(struct afu)));
if (unlikely(!cfg->afu)) {
@@ -1295,10 +1292,10 @@ static irqreturn_t cxlflash_async_err_irq(int irq, void 
*data)
goto out;
}
 
-   /* it is OK to clear AFU status before FC_ERROR */
+   /* FYI, it is 'okay' to clear AFU status before FC_ERROR */
writeq_be(reg_unmasked, &global->regs.aintr_clear);
 
-   /* check each bit that is on */
+   /* Check each bit that is on */
for (i = 0; reg_unmasked; i++, reg_unmasked = (reg_unmasked >> 1)) {
info = find_ainfo(1ULL << i);
if (((reg_unmasked & 0x1) == 0) || !info)
@@ -1311,7 +1308,7 @@ static irqreturn_t cxlflash_async_err_irq(int irq, void 
*data)
   readq_be(&global->fc_regs[port][FC_STATUS / 8]));
 
/*
-* do link reset first, some OTHER errors will set FC_ERROR
+* Do link reset first, some OTHER errors will set FC_ERROR
 * again if cleared before or w/o a reset
 */
if (info->action & LINK_RESET) {
@@ -1326,7 +1323,7 @@ static irqreturn_t cxlflash_async_err_irq(int irq, void 
*data)
reg = readq_be(&global->fc_regs[port][FC_ERROR / 8]);
 
/*
-* since all errors are unmasked, FC_ERROR and FC_ERRCAP
+* Since all errors are unmasked, FC_ERROR and FC_ERRCAP
 * should be the same and tracing one is sufficient.
 */
 
@@ -1472,23 +1469,22 @@ static void init_pcr(struct cxlflash_cfg *cfg)
 
for (i = 0; i < MAX_CONTEXT; i++) {
ctrl_map = &afu->afu_map->ctrls[i].ctrl;
-   /* disrupt any clients that could be running */
-   /* e. g. clients that survived a master restart */
+   /* Disrupt any clients that could be running */
+   /* e.g. clients that survived a master restart */
writeq_be(0, &ctrl_map->rht_start);
writeq_be(0, &ctrl_map->rht_cnt_id);
writeq_be(0, &ctrl_map->ctx_cap);
}
 
-   /* copy frequently used fields into afu */
+   /* Copy frequently used fields into afu */
afu->ctx_hndl = (u16) cxl_process_element(cfg->mcctx);
-   /* ctx_hndl is 16 bits in CAIA */
afu->host_map = &afu->afu_map->hosts[afu->ctx_hndl].host;
afu->ctrl_map = &afu->afu_map->ctrls[afu->ctx_hndl].ctrl;
 
/* Program the Endian Control for the master context */
writeq_be(SISL_ENDIAN

Re: [PATCH v6 26/37] cxlflash: Correct spelling, grammar, and alignment mistakes

2015-10-23 Thread Tomas Henzl
On 21.10.2015 22:15, Matthew R. Ochs wrote:
> There are several spelling and grammar mistakes throughout the
> driver. Additionally there are a handful of places where there
> are extra lines and unnecessary variables/statements. These are
> a nuisance and pollute the driver.
>
> Fix spelling and grammar issues. Update some comments for clarity and
> consistency. Remove extra lines and a few unneeded variables/statements.
>
> Signed-off-by: Matthew R. Ochs 
> Signed-off-by: Manoj N. Kumar 
> Reviewed-by: Brian King 
> Reviewed-by: Andrew Donnellan 

Reviewed-by: Tomas Henzl 

Tomas

--
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