All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <49DCAD12.4070706@fastmail.fm>

diff --git a/a/1.txt b/N1/1.txt
index 7f90f10..966dba7 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -42,13 +42,13 @@ index 63b521d..b971974 100644
 -        next_scb = (struct scb *)malloc(sizeof(*next_scb),
 -                        M_DEVBUF, M_NOWAIT);
 +        next_scb = malloc(sizeof(*next_scb), M_DEVBUF, M_NOWAIT);
-         if (next_scb = NULL)
+         if (next_scb == NULL)
              break;
  
 -        pdata = (struct scb_platform_data *)malloc(sizeof(*pdata),
 -                               M_DEVBUF, M_NOWAIT);
 +        pdata = malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT);
-         if (pdata = NULL) {
+         if (pdata == NULL) {
              free(next_scb, M_DEVBUF);
              break;
 diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -64,17 +64,18 @@ scsi_id, char channel)
 -    tstate = (struct ahc_tmode_tstate*)malloc(sizeof(*tstate),
 -                           M_DEVBUF, M_NOWAIT);
 +    tstate = malloc(sizeof(*tstate), M_DEVBUF, M_NOWAIT);
-     if (tstate = NULL)
+     if (tstate == NULL)
          return (NULL);
  
 @@ -4783,8 +4782,7 @@ ahc_init_scbdata(struct ahc_softc *ahc)
      SLIST_INIT(&scb_data->sg_maps);
  
      /* Allocate SCB resources */
--    scb_data->scbarray -        (struct scb *)malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
+-    scb_data->scbarray =
+-        (struct scb *)malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
 +    scb_data->scbarray = malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
                   M_DEVBUF, M_NOWAIT);
-     if (scb_data->scbarray = NULL)
+     if (scb_data->scbarray == NULL)
          return (ENOMEM);
 @@ -5014,8 +5012,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)
  #ifndef __linux__
@@ -83,7 +84,7 @@ scsi_id, char channel)
 -        pdata = (struct scb_platform_data *)malloc(sizeof(*pdata),
 -                               M_DEVBUF, M_NOWAIT);
 +        pdata = malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT);
-         if (pdata = NULL)
+         if (pdata == NULL)
              break;
          next_scb->platform_data = pdata;
 diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.c
@@ -98,7 +99,7 @@ index e4a7787..38e1690 100644
 -    new_patch = (patch_t *)malloc(sizeof(*new_patch));
 +    new_patch = malloc(sizeof(*new_patch));
  
-     if (new_patch = NULL)
+     if (new_patch == NULL)
          stop("Could not malloc patch structure", EX_OSERR);
 @@ -550,7 +550,7 @@ output_listing(char *ifilename)
  
@@ -107,7 +108,7 @@ index e4a7787..38e1690 100644
 -        func_values = (int *)malloc(func_count * sizeof(int));
 +        func_values = malloc(func_count * sizeof(int));
  
-         if (func_values = NULL)
+         if (func_values == NULL)
              stop("Could not malloc", EX_OSERR);
 @@ -734,7 +734,7 @@ seq_alloc()
  {
@@ -115,7 +116,7 @@ index e4a7787..38e1690 100644
  
 -    new_instr = (struct instruction *)malloc(sizeof(struct instruction));
 +    new_instr = malloc(sizeof(struct instruction));
-     if (new_instr = NULL)
+     if (new_instr == NULL)
          stop("Unable to malloc instruction object", EX_SOFTWARE);
      memset(new_instr, 0, sizeof(*new_instr));
 @@ -748,7 +748,7 @@ cs_alloc()
@@ -124,7 +125,7 @@ index e4a7787..38e1690 100644
  
 -    new_cs= (critical_section_t *)malloc(sizeof(critical_section_t));
 +    new_cs= malloc(sizeof(critical_section_t));
-     if (new_cs = NULL)
+     if (new_cs == NULL)
          stop("Unable to malloc critical_section object", EX_SOFTWARE);
      memset(new_cs, 0, sizeof(*new_cs));
 @@ -762,7 +762,7 @@ scope_alloc()
@@ -133,7 +134,7 @@ index e4a7787..38e1690 100644
  
 -    new_scope = (scope_t *)malloc(sizeof(scope_t));
 +    new_scope = malloc(sizeof(scope_t));
-     if (new_scope = NULL)
+     if (new_scope == NULL)
          stop("Unable to malloc scope object", EX_SOFTWARE);
      memset(new_scope, 0, sizeof(*new_scope));
 diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
@@ -147,7 +148,7 @@ index 078ed60..c7c5812 100644
  
 -    new_symbol = (symbol_t *)malloc(sizeof(symbol_t));
 +    new_symbol = malloc(sizeof(symbol_t));
-     if (new_symbol = NULL) {
+     if (new_symbol == NULL) {
          perror("Unable to create new symbol");
          exit(EX_SOFTWARE);
 @@ -227,7 +227,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol,
@@ -157,7 +158,7 @@ int how)
  
 -    newnode = (symbol_node_t *)malloc(sizeof(symbol_node_t));
 +    newnode = malloc(sizeof(symbol_node_t));
-     if (newnode = NULL) {
+     if (newnode == NULL) {
          stop("symlist_add: Unable to malloc symbol_node", EX_SOFTWARE);
          /* NOTREACHED */
 diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c
@@ -165,14 +166,14 @@ index 93984c9..96c2f92 100644
 --- a/drivers/scsi/aic7xxx_old.c
 +++ b/drivers/scsi/aic7xxx_old.c
 @@ -2569,8 +2569,7 @@ aic7xxx_allocate_scb(struct aic7xxx_host *p)
-     if (scb_ap = NULL)
+     if (scb_ap == NULL)
        return(0);
      scb_dma = (struct aic7xxx_scb_dma *)&scb_ap[scb_count];
 -    hsgp = (struct hw_scatterlist *)
 -      pci_alloc_consistent(p->pdev, scb_size * scb_count,
 +    hsgp = pci_alloc_consistent(p->pdev, scb_size * scb_count,
                 &scb_dma->dma_address);
-     if (hsgp = NULL)
+     if (hsgp == NULL)
      {
 diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c
 b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -213,7 +214,7 @@ index 311ed6d..dabe99d 100644
 @@ -2441,8 +2441,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport,
 uint32_t did)
          if ((vport->fc_flag & FC_RSCN_MODE) != 0 &&
-             lpfc_rscn_payload_check(vport, did) = 0)
+             lpfc_rscn_payload_check(vport, did) == 0)
              return NULL;
 -        ndlp = (struct lpfc_nodelist *)
 -             mempool_alloc(vport->phba->nlp_mem_pool, GFP_KERNEL);
@@ -318,8 +319,8 @@ osst_read_back_buffer_and_rewrite(struct osst_tape * STp, struct osst
  #endif
  
 -    if ((buffer = (unsigned char *)vmalloc((nframes + 1) *
-OS_DATA_SIZE)) = NULL)
-+    if ((buffer = vmalloc((nframes + 1) * OS_DATA_SIZE)) = NULL)
+OS_DATA_SIZE)) == NULL)
++    if ((buffer = vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL)
          return (-EIO);
  
      printk(KERN_INFO "%s:I: Reading back %d frames from drive buffer%s\n",
@@ -327,10 +328,10 @@ OS_DATA_SIZE)) = NULL)
 STp, struct osst_request ** aSRp
      if (STp->raw) return 0;
  
-     if (STp->header_cache = NULL) {
+     if (STp->header_cache == NULL) {
 -        if ((STp->header_cache = (os_header_t
-*)vmalloc(sizeof(os_header_t))) = NULL) {
-+        if ((STp->header_cache = vmalloc(sizeof(os_header_t))) = NULL) {
+*)vmalloc(sizeof(os_header_t))) == NULL) {
++        if ((STp->header_cache = vmalloc(sizeof(os_header_t))) == NULL) {
              printk(KERN_ERR "%s:E: Failed to allocate header cache\n",
 name);
              return (-ENOMEM);
@@ -339,10 +340,10 @@ name);
 * STp, struct osst_request **
                     name, ppos, update_frame_cntr);
  #endif
-         if (STp->header_cache = NULL) {
+         if (STp->header_cache == NULL) {
 -            if ((STp->header_cache = (os_header_t
-*)vmalloc(sizeof(os_header_t))) = NULL) {
-+            if ((STp->header_cache = vmalloc(sizeof(os_header_t))) =
+*)vmalloc(sizeof(os_header_t))) == NULL) {
++            if ((STp->header_cache = vmalloc(sizeof(os_header_t))) ==
 NULL) {
                  printk(KERN_ERR "%s:E: Failed to allocate header
 cache\n", name);
diff --git a/a/content_digest b/N1/content_digest
index 90de47e..e83a6be 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -11,7 +11,7 @@
  "ref\036ca99e90904080458u71ccbd15vd568bbf25c218a6a@mail.gmail.com\0"
  "From\0Jack Stone <jwjstone@fastmail.fm>\0"
  "Subject\0Re: [PATCH 45/56] scsi: Remove void casts\0"
- "Date\0Wed, 08 Apr 2009 13:56:34 +0000\0"
+ "Date\0Wed, 08 Apr 2009 14:56:34 +0100\0"
  "To\0Bert Wesarg <bert.wesarg@googlemail.com>\0"
  "Cc\0linux-kernel@vger.kernel.org"
   jeff@garzik.org
@@ -62,13 +62,13 @@
  "-        next_scb = (struct scb *)malloc(sizeof(*next_scb),\n"
  "-                        M_DEVBUF, M_NOWAIT);\n"
  "+        next_scb = malloc(sizeof(*next_scb), M_DEVBUF, M_NOWAIT);\n"
- "         if (next_scb = NULL)\n"
+ "         if (next_scb == NULL)\n"
  "             break;\n"
  " \n"
  "-        pdata = (struct scb_platform_data *)malloc(sizeof(*pdata),\n"
  "-                               M_DEVBUF, M_NOWAIT);\n"
  "+        pdata = malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT);\n"
- "         if (pdata = NULL) {\n"
+ "         if (pdata == NULL) {\n"
  "             free(next_scb, M_DEVBUF);\n"
  "             break;\n"
  "diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c\n"
@@ -84,17 +84,18 @@
  "-    tstate = (struct ahc_tmode_tstate*)malloc(sizeof(*tstate),\n"
  "-                           M_DEVBUF, M_NOWAIT);\n"
  "+    tstate = malloc(sizeof(*tstate), M_DEVBUF, M_NOWAIT);\n"
- "     if (tstate = NULL)\n"
+ "     if (tstate == NULL)\n"
  "         return (NULL);\n"
  " \n"
  "@@ -4783,8 +4782,7 @@ ahc_init_scbdata(struct ahc_softc *ahc)\n"
  "     SLIST_INIT(&scb_data->sg_maps);\n"
  " \n"
  "     /* Allocate SCB resources */\n"
- "-    scb_data->scbarray -        (struct scb *)malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,\n"
+ "-    scb_data->scbarray =\n"
+ "-        (struct scb *)malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,\n"
  "+    scb_data->scbarray = malloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,\n"
  "                  M_DEVBUF, M_NOWAIT);\n"
- "     if (scb_data->scbarray = NULL)\n"
+ "     if (scb_data->scbarray == NULL)\n"
  "         return (ENOMEM);\n"
  "@@ -5014,8 +5012,7 @@ ahc_alloc_scbs(struct ahc_softc *ahc)\n"
  " #ifndef __linux__\n"
@@ -103,7 +104,7 @@
  "-        pdata = (struct scb_platform_data *)malloc(sizeof(*pdata),\n"
  "-                               M_DEVBUF, M_NOWAIT);\n"
  "+        pdata = malloc(sizeof(*pdata), M_DEVBUF, M_NOWAIT);\n"
- "         if (pdata = NULL)\n"
+ "         if (pdata == NULL)\n"
  "             break;\n"
  "         next_scb->platform_data = pdata;\n"
  "diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.c\n"
@@ -118,7 +119,7 @@
  "-    new_patch = (patch_t *)malloc(sizeof(*new_patch));\n"
  "+    new_patch = malloc(sizeof(*new_patch));\n"
  " \n"
- "     if (new_patch = NULL)\n"
+ "     if (new_patch == NULL)\n"
  "         stop(\"Could not malloc patch structure\", EX_OSERR);\n"
  "@@ -550,7 +550,7 @@ output_listing(char *ifilename)\n"
  " \n"
@@ -127,7 +128,7 @@
  "-        func_values = (int *)malloc(func_count * sizeof(int));\n"
  "+        func_values = malloc(func_count * sizeof(int));\n"
  " \n"
- "         if (func_values = NULL)\n"
+ "         if (func_values == NULL)\n"
  "             stop(\"Could not malloc\", EX_OSERR);\n"
  "@@ -734,7 +734,7 @@ seq_alloc()\n"
  " {\n"
@@ -135,7 +136,7 @@
  " \n"
  "-    new_instr = (struct instruction *)malloc(sizeof(struct instruction));\n"
  "+    new_instr = malloc(sizeof(struct instruction));\n"
- "     if (new_instr = NULL)\n"
+ "     if (new_instr == NULL)\n"
  "         stop(\"Unable to malloc instruction object\", EX_SOFTWARE);\n"
  "     memset(new_instr, 0, sizeof(*new_instr));\n"
  "@@ -748,7 +748,7 @@ cs_alloc()\n"
@@ -144,7 +145,7 @@
  " \n"
  "-    new_cs= (critical_section_t *)malloc(sizeof(critical_section_t));\n"
  "+    new_cs= malloc(sizeof(critical_section_t));\n"
- "     if (new_cs = NULL)\n"
+ "     if (new_cs == NULL)\n"
  "         stop(\"Unable to malloc critical_section object\", EX_SOFTWARE);\n"
  "     memset(new_cs, 0, sizeof(*new_cs));\n"
  "@@ -762,7 +762,7 @@ scope_alloc()\n"
@@ -153,7 +154,7 @@
  " \n"
  "-    new_scope = (scope_t *)malloc(sizeof(scope_t));\n"
  "+    new_scope = malloc(sizeof(scope_t));\n"
- "     if (new_scope = NULL)\n"
+ "     if (new_scope == NULL)\n"
  "         stop(\"Unable to malloc scope object\", EX_SOFTWARE);\n"
  "     memset(new_scope, 0, sizeof(*new_scope));\n"
  "diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c\n"
@@ -167,7 +168,7 @@
  " \n"
  "-    new_symbol = (symbol_t *)malloc(sizeof(symbol_t));\n"
  "+    new_symbol = malloc(sizeof(symbol_t));\n"
- "     if (new_symbol = NULL) {\n"
+ "     if (new_symbol == NULL) {\n"
  "         perror(\"Unable to create new symbol\");\n"
  "         exit(EX_SOFTWARE);\n"
  "@@ -227,7 +227,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol,\n"
@@ -177,7 +178,7 @@
  " \n"
  "-    newnode = (symbol_node_t *)malloc(sizeof(symbol_node_t));\n"
  "+    newnode = malloc(sizeof(symbol_node_t));\n"
- "     if (newnode = NULL) {\n"
+ "     if (newnode == NULL) {\n"
  "         stop(\"symlist_add: Unable to malloc symbol_node\", EX_SOFTWARE);\n"
  "         /* NOTREACHED */\n"
  "diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c\n"
@@ -185,14 +186,14 @@
  "--- a/drivers/scsi/aic7xxx_old.c\n"
  "+++ b/drivers/scsi/aic7xxx_old.c\n"
  "@@ -2569,8 +2569,7 @@ aic7xxx_allocate_scb(struct aic7xxx_host *p)\n"
- "     if (scb_ap = NULL)\n"
+ "     if (scb_ap == NULL)\n"
  "       return(0);\n"
  "     scb_dma = (struct aic7xxx_scb_dma *)&scb_ap[scb_count];\n"
  "-    hsgp = (struct hw_scatterlist *)\n"
  "-      pci_alloc_consistent(p->pdev, scb_size * scb_count,\n"
  "+    hsgp = pci_alloc_consistent(p->pdev, scb_size * scb_count,\n"
  "                &scb_dma->dma_address);\n"
- "     if (hsgp = NULL)\n"
+ "     if (hsgp == NULL)\n"
  "     {\n"
  "diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c\n"
  "b/drivers/scsi/ibmvscsi/ibmvscsi.c\n"
@@ -233,7 +234,7 @@
  "@@ -2441,8 +2441,7 @@ lpfc_setup_disc_node(struct lpfc_vport *vport,\n"
  "uint32_t did)\n"
  "         if ((vport->fc_flag & FC_RSCN_MODE) != 0 &&\n"
- "             lpfc_rscn_payload_check(vport, did) = 0)\n"
+ "             lpfc_rscn_payload_check(vport, did) == 0)\n"
  "             return NULL;\n"
  "-        ndlp = (struct lpfc_nodelist *)\n"
  "-             mempool_alloc(vport->phba->nlp_mem_pool, GFP_KERNEL);\n"
@@ -338,8 +339,8 @@
  " #endif\n"
  " \n"
  "-    if ((buffer = (unsigned char *)vmalloc((nframes + 1) *\n"
- "OS_DATA_SIZE)) = NULL)\n"
- "+    if ((buffer = vmalloc((nframes + 1) * OS_DATA_SIZE)) = NULL)\n"
+ "OS_DATA_SIZE)) == NULL)\n"
+ "+    if ((buffer = vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL)\n"
  "         return (-EIO);\n"
  " \n"
  "     printk(KERN_INFO \"%s:I: Reading back %d frames from drive buffer%s\\n\",\n"
@@ -347,10 +348,10 @@
  "STp, struct osst_request ** aSRp\n"
  "     if (STp->raw) return 0;\n"
  " \n"
- "     if (STp->header_cache = NULL) {\n"
+ "     if (STp->header_cache == NULL) {\n"
  "-        if ((STp->header_cache = (os_header_t\n"
- "*)vmalloc(sizeof(os_header_t))) = NULL) {\n"
- "+        if ((STp->header_cache = vmalloc(sizeof(os_header_t))) = NULL) {\n"
+ "*)vmalloc(sizeof(os_header_t))) == NULL) {\n"
+ "+        if ((STp->header_cache = vmalloc(sizeof(os_header_t))) == NULL) {\n"
  "             printk(KERN_ERR \"%s:E: Failed to allocate header cache\\n\",\n"
  "name);\n"
  "             return (-ENOMEM);\n"
@@ -359,10 +360,10 @@
  "* STp, struct osst_request **\n"
  "                    name, ppos, update_frame_cntr);\n"
  " #endif\n"
- "         if (STp->header_cache = NULL) {\n"
+ "         if (STp->header_cache == NULL) {\n"
  "-            if ((STp->header_cache = (os_header_t\n"
- "*)vmalloc(sizeof(os_header_t))) = NULL) {\n"
- "+            if ((STp->header_cache = vmalloc(sizeof(os_header_t))) =\n"
+ "*)vmalloc(sizeof(os_header_t))) == NULL) {\n"
+ "+            if ((STp->header_cache = vmalloc(sizeof(os_header_t))) ==\n"
  "NULL) {\n"
  "                 printk(KERN_ERR \"%s:E: Failed to allocate header\n"
  "cache\\n\", name);\n"
@@ -382,4 +383,4 @@
  "         if (!kaddr)\n"
               goto out;
 
-dccd0489b0c321a22e545c0176a945e7429651b0529858e9d7f50a6b1cc45030
+949a1c8d15493bb43da04940337cc20025ddcb87d3aa6a443fd8aa23162aef50

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.