From patchwork Thu Jul 18 19:22:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasyl Gomonovych X-Patchwork-Id: 11049447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3EA1213AC for ; Thu, 18 Jul 2019 19:22:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2817C288AC for ; Thu, 18 Jul 2019 19:22:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19C00288AF; Thu, 18 Jul 2019 19:22:39 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 A4D15288AC for ; Thu, 18 Jul 2019 19:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391379AbfGRTWf (ORCPT ); Thu, 18 Jul 2019 15:22:35 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35137 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391376AbfGRTWe (ORCPT ); Thu, 18 Jul 2019 15:22:34 -0400 Received: by mail-lj1-f195.google.com with SMTP id x25so28502091ljh.2; Thu, 18 Jul 2019 12:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MPOypPN7ES0HfrHOEJDZEvTo/LO4/CTjZDQyk4lr3t0=; b=YM9MWHGsPnDHX7Mv99dr0tlsFi5P7oTEzIcDA+oIRobemnxvVR6kl+HVRUPCzPzWrJ kYIbsOuJcrOQkIhN2Q9Xuad5MSrtvqFdi+S2fsKIrFMkSMxHpkHxriYxPUKVMJrFuAoC M341gtwHCiCQsWIePgsOcCVDhjUmI0KUX4gSr07dhQ0YJGA0hnoDxOe3By2hlOIbBt6w RrEsacL+fR8pQMsnwS0fxb74fylv6ug4Wpb5HMF9lRMrN94w1TidGoEGxU3GWfblXIck AYy+/jx48NSF2IMc7H6Z4U6M8+oHrbkPAh/rmeNBOMNF/ee7tYpa2aD4KmlA7nVJJfGN 6obg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MPOypPN7ES0HfrHOEJDZEvTo/LO4/CTjZDQyk4lr3t0=; b=W8uB46AXP3KcQIUNAAA6Rc+3T4rN9Qpawrh6QCMm+sr5rTGm/R1y4Q1ANKTv/7MB6L mAMKT6r1yzP7FHlI4xQ84VQ8D3av5fz+QkzxrZiv+Q0d65p+M8oz4vk2u4E3FiAFPG6f 5QxeFwyEvCu7fggPmsMJmxqC9tYINguUO8M7i7TTGiJoO2nrv00XE3FNEPp0L5pBh+vA wxn70jvhT2WhjC6eYjfnkNAtwkY1Ji+xUz8I3Qt1GWNHl3Z2s3p/+eoI6AI5ZdYYfWrQ 2LlKwyY6O57ncrGSwNlDkZ59+xEwQ4GyJt2enMcsPcCZXCQu+mXka7ZSH2kC9mNhDBhc ppNA== X-Gm-Message-State: APjAAAVDhXYerIFbgFI6PbvhHzWum16ySyzTBairmfRw9Pw3DSQgq5TI VPcs26B9E5vJhdKxif/g7YM= X-Google-Smtp-Source: APXvYqwL2MHCOiSjNvUiBBlpDkZGWrJxYFRv6K3r/k53MVqrEx7+Vb397Z/B5mM5Y4Hr69R7uKUHkw== X-Received: by 2002:a2e:814e:: with SMTP id t14mr25946476ljg.167.1563477752556; Thu, 18 Jul 2019 12:22:32 -0700 (PDT) Received: from ul001888.eu.tieto.com ([91.90.160.140]) by smtp.gmail.com with ESMTPSA id o8sm3545512lfi.15.2019.07.18.12.22.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 12:22:31 -0700 (PDT) From: Vasyl Gomonovych To: linuxdrivers@attotech.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org Cc: Vasyl Gomonovych , linux-kernel@vger.kernel.org Subject: [PATCH] [SCSI] esas2r: remove casting dma_alloc_coherent Date: Thu, 18 Jul 2019 21:22:15 +0200 Message-Id: <20190718192215.17248-1-gomonovych@gmail.com> X-Mailer: git-send-email 2.17.1 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 Fix allocation style Generated by: alloc_cast.cocci Signed-off-by: Vasyl Gomonovych --- drivers/scsi/esas2r/esas2r_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c index 3d130523c288..eece7e80cb59 100644 --- a/drivers/scsi/esas2r/esas2r_ioctl.c +++ b/drivers/scsi/esas2r/esas2r_ioctl.c @@ -1552,7 +1552,7 @@ static int allocate_fw_buffers(struct esas2r_adapter *a, u32 length) a->firmware.orig_len = length; - a->firmware.data = (u8 *)dma_alloc_coherent(&a->pcid->dev, + a->firmware.data = dma_alloc_coherent(&a->pcid->dev, (size_t)length, (dma_addr_t *)&a->firmware. phys, @@ -1899,7 +1899,7 @@ int esas2r_write_vda(struct esas2r_adapter *a, const char *buf, long off, if (!a->vda_buffer) { dma_addr_t dma_addr; - a->vda_buffer = (u8 *)dma_alloc_coherent(&a->pcid->dev, + a->vda_buffer = dma_alloc_coherent(&a->pcid->dev, (size_t) VDA_MAX_BUFFER_SIZE, &dma_addr, @@ -2068,7 +2068,7 @@ int esas2r_write_fs(struct esas2r_adapter *a, const char *buf, long off, re_allocate_buffer: a->fs_api_buffer_size = length; - a->fs_api_buffer = (u8 *)dma_alloc_coherent( + a->fs_api_buffer = dma_alloc_coherent( &a->pcid->dev, (size_t)a->fs_api_buffer_size, (dma_addr_t *)&a->ppfs_api_buffer,