From patchwork Fri Jun 10 20:39:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9170433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C0A1A6048F for ; Fri, 10 Jun 2016 20:39:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4667282F9 for ; Fri, 10 Jun 2016 20:39:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A85E128047; Fri, 10 Jun 2016 20:39:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BCE028047 for ; Fri, 10 Jun 2016 20:39:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752762AbcFJUj4 (ORCPT ); Fri, 10 Jun 2016 16:39:56 -0400 Received: from mout.gmx.net ([212.227.17.20]:49919 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbcFJUjy (ORCPT ); Fri, 10 Jun 2016 16:39:54 -0400 Received: from p100.box ([92.203.6.125]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MarAM-1arCXp1oZG-00KSy0; Fri, 10 Jun 2016 22:39:47 +0200 Date: Fri, 10 Jun 2016 22:39:45 +0200 From: Helge Deller To: James Bottomley , linux-scsi@vger.kernel.org Cc: linux-parisc@vger.kernel.org Subject: [PATCH][SCSI] 53c700: Use proper debug printk format specifiers Message-ID: <20160610203945.GA18046@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:JyZRsy+LXTgWHHa4/Rr9ECqo+MwLZ1rvFUDtr6foVL9ENTgqobS whoE8XEBQNjK0M/qdYoVoK+0cDdmQ4Jb2mU7uhEJPN+kSgfTAVdcNMNsslv5S+HpwcT01Bl uKqE3ApE2rQHLYV8bS1gwvlxPq+ZTg3PjA0T1fYYTCUOPIKkMEtHwu5r8CXCa9nYyDE/DqX Tnr/QBtR3mvXqi3fr+12w== X-UI-Out-Filterresults: notjunk:1; V01:K0:ArmDTH3koHw=:pTUGE6maG7CAByLrbyU9H0 TtfKTbr/6xnMQPIv6pZsbfzItq2c8dJ0Q3Jn3p1G4/zNgSQQEhqsIqa3vM4SNfR3cF4AV3nvk 91bm+Ti0P7WEMCq+mP9ViLVpoLfzzDBAPP6i31HVBiejmjCFsDSLkMqdNi5VOLgbk7alHI9EP dwV6oQ5IstTHlZSkX+iA81hAV6RVo9YrZCBK6zIQE5jIRsBjGazyWrbAcjVVZREMyR6h5fa7f U2rFCsuza4EQ/811aLAcI2Zx7y6fwkyn7l8FNu6ivAxKVexK/CGk2f9RkrF6tsNY7OdgtUQbq cXOK+x/Nlod+tMXmoWmgmZKfPIrSJVlQBKFh6/M2Y2fuNTnLwbuf5EugkcXxH7iNsmWZ4Bu+7 v69gLZTFXfHTdI/+cKJCrcqP1Pmvxih8OKWMeZnSug8zzu1odz8u5bfzIT4yzhsS+RDxSqUcH eQTasUm9f+2U9PP1Qny2Hoqor2duhu7cdEesoqIYz2UKJTYXCFfC9KD9+2/I/J15elCDfK7ta 2ralgxZPWYgB1otUaunBE724xB1+buO6UzkanisjrgL0NdMpvxhZt6mm0VaJ0dPmihQfEdSTy BcELmR5fKk5Ink0Zkk2mXC+SDTXmzjq7608M6kf/ohUyk19BaPil4nwozzqqC2vNIvRNqpTi+ 6VQl0LiAADkwL4sbRK63o0IyR/KlVMY2I+pGU3LpG6M5qflBEleSdagfe0gRWQw7aVVIymB3Z 0Pm2ruF1KOnQe/PSlSrveEdfMXdLEkyLynrDOIiy/yuaNM7lfNkX67P8dig= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When enabling the debug options NCR_700_DEBUG and NCR_700_TAG_DEBUG various printk format warnings can be seen like: drivers/scsi/53c700.c:357:2: warning: format ‘%p’ expects argument of type ‘void *’, but argument 4 has type ‘dma_addr_t’ [-Wformat=] script_patch_32(hostdata->dev, script, MessageLocation, Fix them by using the right printk format specifiers. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index d4c2856..56bec27 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -1892,7 +1892,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *) slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); slot->SG[i].pAddr = 0; dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); - DEBUG((" SETTING %08lx to %x\n", + DEBUG((" SETTING %p to %x\n", (&slot->pSG[i].ins), slot->SG[i].ins)); } diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index e06bdfe..fd32971 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h @@ -423,23 +423,25 @@ struct NCR_700_Host_Parameters { #define script_patch_32(dev, script, symbol, value) \ { \ int i; \ + dma_addr_t da = value; \ for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ - __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + value; \ + __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + da; \ (script)[A_##symbol##_used[i]] = bS_to_host(val); \ dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ - DEBUG((" script, patching %s at %d to 0x%lx\n", \ - #symbol, A_##symbol##_used[i], (value))); \ + DEBUG((" script, patching %s at %d to %pad\n", \ + #symbol, A_##symbol##_used[i], &da)); \ } \ } #define script_patch_32_abs(dev, script, symbol, value) \ { \ int i; \ + dma_addr_t da = value; \ for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ - (script)[A_##symbol##_used[i]] = bS_to_host(value); \ + (script)[A_##symbol##_used[i]] = bS_to_host(da); \ dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ - DEBUG((" script, patching %s at %d to 0x%lx\n", \ - #symbol, A_##symbol##_used[i], (value))); \ + DEBUG((" script, patching %s at %d to %pad\n", \ + #symbol, A_##symbol##_used[i], &da)); \ } \ }