Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2588810ybh; Mon, 9 Mar 2020 08:54:05 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt0j1x7bH6j5WpvJ0vIl4QWGqJpb6/t4B7IQqy6dS1kojy2VLHqdi1nVP0NSmla4Mm1Dg/1 X-Received: by 2002:a9d:480c:: with SMTP id c12mr13181328otf.336.1583769245522; Mon, 09 Mar 2020 08:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583769245; cv=none; d=google.com; s=arc-20160816; b=06OJ6y0mcGyAQXyRKfM09IJGlaMPvjJVVWJhhXc+KqPx5L9T5q0/KTGgvhtcelr1Ae y7kOdYwNHr9IT8QlrJC92A3n7Ud8t8lWt1hmtw5JhwVzl0Fgogi+zhuRoxri0998gaQn QozR74mLF5P5O1MUoRQymP+xt8ilT7LRZvVTnCEdNf5O8z/GQ/1UgVCCUiVdy8PseCbU SZN7EmfZ8A5FJpkWBakns676QJ6qZ0h2n7pi14unyMi7FGs4f+7eM+5P4RNbviaRweGn TE00f5qlz6AdMVgyZrZ7oPKRfKJiVwGdilxE9871AKutDj82PrW8Mmfz78bl1OP8CPVb h4Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0QOwGWZDroTuYZKUvEz4ThZBE28k0R9BlVBpj2B89t4=; b=t5L4YocACfMkcXryuXoc0DHPOafdKyPsrWwH1M2PIbQ4Uh4Fzvn2ovOgR+YFDlUSCF e4hoyktBwtMTAXPHGUTb3oWa6UrT5ecsi1ORxnpcDiVvh7xkoYHlH7h7F4ivWkQzazuR jWcc3mKDW0bgzfm3UEOjh+cg2FlzV2v4j08As3s0Fz/w/g3keUTVbjNiDH0Y1085G0m3 1ufRFjMbFZs5pXz46uaRof/r8TyakM/2f/FDI9Ql+U/g2CyH7iLfWE384jLuD8xq4tjg wPaoGjndmOUFR6kaJ8HgRpnniVYC2MVvCxfBGC4u/UxJM+93OBsSMFU52OB3qDQzAIHe 0aYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y5wSdA1s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v81si4572669oia.114.2020.03.09.08.53.53; Mon, 09 Mar 2020 08:54:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y5wSdA1s; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727113AbgCIPxg (ORCPT + 99 others); Mon, 9 Mar 2020 11:53:36 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:47015 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbgCIPxg (ORCPT ); Mon, 9 Mar 2020 11:53:36 -0400 Received: by mail-pg1-f196.google.com with SMTP id y30so4867961pga.13; Mon, 09 Mar 2020 08:53:34 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=0QOwGWZDroTuYZKUvEz4ThZBE28k0R9BlVBpj2B89t4=; b=Y5wSdA1sUAyKXpPWRphvCWwfduXynvra+u0WNhAfzkPhfNscROVbGY1S/bkaVAtR0d DWMvs8OIREJ2zcLq4NdG0hahwt1OzZt2yRnkl7O5eDMvo3y7kE/ujGZIGHRI7Tdp844p PBvypNHY1xNK/dsjrSC5IB/6EysRnW3R9ehUfxBd8dbMeyyS6mcs+V5dZYdnDZfV0SCY 60WQA2j3zEZQ9Sv9UYyTU/rf4JJRqKbPXsvRewmszm/qQgtdpewpwyyvdysdb8ROXcVj Ti4UFYqV1Xp5vL87P/TG+TtI1QU22yrhdESprjAPQyapSkpHbXI+Ea4QsO5OxvEphEEg Gwkg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0QOwGWZDroTuYZKUvEz4ThZBE28k0R9BlVBpj2B89t4=; b=iqu/wZSi/w3IsN//BSOcRQJNz/Up/UoNNwAjqHd86lFJcrOfLNchLKLycgGGQHK2za AKiKpYnkTOptXWUQVWqrY771FJ50zwVgpD7k4/CjdwXxOl5q7gKYHOfO6RcNFbxiCQTA Gzw/mM6bQnvgcU5epJc9QXVFwvkEalRtUcxOzwiWmbpHTx1sDe+lVKbaWxm1s8Csb+zz DeWmTFeH6+pdcTO17QEo8HcYFasO81IVShLiaU1RVTyjGNIZeO1v/UEpp7Ak9plnDO62 wi+j3Ze6ADZ7UkrMhOF30RfCT2ZqJrIuPfuGHCJAAR5pcJsqLCVw6SbZb/LE86nwbGDV A8wg== X-Gm-Message-State: ANhLgQ0gDNnx0Ys2fo4nxK43NdSWTwTikPIuG66TreEpXFN7op7r1Hbz vVpGm4traA1u5XF+X3KTSHQ= X-Received: by 2002:a63:1862:: with SMTP id 34mr13988788pgy.191.1583769214024; Mon, 09 Mar 2020 08:53:34 -0700 (PDT) Received: from debian.net.fpt ([2405:4800:58c7:2b5b:996c:8b3a:a70f:c38a]) by smtp.gmail.com with ESMTPSA id w31sm19138587pgl.84.2020.03.09.08.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 08:53:33 -0700 (PDT) From: Phong Tran To: john.garry@huawei.com Cc: aacraid@microsemi.com, bvanassche@acm.org, jejb@linux.ibm.com, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, martin.petersen@oracle.com, tranmanphong@gmail.com Subject: [PATCH v3] scsi: aacraid: cleanup warning cast-function-type Date: Mon, 9 Mar 2020 22:53:19 +0700 Message-Id: <20200309155319.12658-1-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <9a0e6373-b4a3-0822-3b65-e3b326266832@huawei.com> References: <9a0e6373-b4a3-0822-3b65-e3b326266832@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the aacraid driver -Wcast-function-type clean Report by: https://github.com/KSPP/linux/issues/20 drivers/scsi/aacraid/aachba.c:813:23: warning: cast between incompatible function types from 'int (*)(struct scsi_cmnd *)' to 'void (*)(struct scsi_cmnd *)' [-Wcast-function-type] Reviewed-by: Bart van Assche Signed-off-by: Phong Tran --- drivers/scsi/aacraid/aachba.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 33dbc051bff9..ebfb42af67f5 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -798,6 +798,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd) return 0; } +static void aac_probe_container_scsi_done(struct scsi_cmnd *scsi_cmnd) +{ + aac_probe_container_callback1(scsi_cmnd); +} + int aac_probe_container(struct aac_dev *dev, int cid) { struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL); @@ -810,7 +815,7 @@ int aac_probe_container(struct aac_dev *dev, int cid) return -ENOMEM; } scsicmd->list.next = NULL; - scsicmd->scsi_done = (void (*)(struct scsi_cmnd*))aac_probe_container_callback1; + scsicmd->scsi_done = aac_probe_container_scsi_done; scsicmd->device = scsidev; scsidev->sdev_state = 0; -- 2.20.1