Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1071424ybh; Sat, 7 Mar 2020 18:09:54 -0800 (PST) X-Google-Smtp-Source: ADFU+vtLfpH7nA2tq2vr2Z+/SZnZg7b14ndt30NIRNnQR8J7DR+HC+DkMFG4aRnGwaGGeo9aJMAn X-Received: by 2002:aca:b1d5:: with SMTP id a204mr7312230oif.82.1583633394368; Sat, 07 Mar 2020 18:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583633394; cv=none; d=google.com; s=arc-20160816; b=s0o9hxqSyZcc6CRb9uNU+/+IfIT00iC+jpDPbLWFhkiuJIudev/KBTj9bXivpdAtRk PSpCWa2vw4tW/znzupYETN+up7lZf4SAHCWFvlR4GMzW3dDSvO2Y/Y0ERsCw2k/NAEWu f2054QGdpa61La7Q5a8kH+QhUpMdc5gjaJvKJkd5vM3Wnbx9HkxRm+h5RZoXSC2EuMaZ wGQzmM8+aXGyVpWr95L6px+JATGr/jGp4dhVxvqG+BOQUaHbEMIv4paNYvcrbnX6fDkU It5qtzmC9gN8ZUyWEy9W/PZJFe2X4/jl+tsREIggS3VMkgP3FzVCzqkl2guraHVhjmPV 2iAw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:dkim-signature; bh=Du4MsZg/glfLsACkWt4Gh7Tp3tFJWcmPYFYVoz1w/hs=; b=kQ4Ucct1zkufZqUkP9wh+CVvYnisN67aY/m3CFUZsLF7lyC17Y5V4HQrIhWwl9yvnJ JS49B52x3jQf9xn68cX3PPTCqh0H/+/ZoAXjwD0taEqD9OpGhCBDwFnNWd5GKaQBD/YK /MpVpQ58xwc+u56cURqOf50N2lGW6FwDmDR6k/Au9j374cOGe7mQLsd8rtWp+8GFL+jo DxVXTO1/TGS/Ykre1tUR+KZijVo6FByAZcPVb5VprR7n0uvksCJvGQ2ABlVy5QbrTisF 0it29elg6lo2yJ0gOElyvpdoZnMcedCfF793exYv56kaQy//aJkUuuYTrMoTbLWwildk 0p4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B6dQE91b; 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 a19si2030167oid.254.2020.03.07.18.09.42; Sat, 07 Mar 2020 18:09:54 -0800 (PST) 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=B6dQE91b; 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 S1726318AbgCHCJF (ORCPT + 99 others); Sat, 7 Mar 2020 21:09:05 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41363 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbgCHCJE (ORCPT ); Sat, 7 Mar 2020 21:09:04 -0500 Received: by mail-pl1-f194.google.com with SMTP id t14so2541405plr.8; Sat, 07 Mar 2020 18:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Du4MsZg/glfLsACkWt4Gh7Tp3tFJWcmPYFYVoz1w/hs=; b=B6dQE91bKbKlZhGOPw9vlSlAZyeiGmZasnsILT0swiDP3/Km+t/6dSCpvGIiXeJZg9 36wWaizaEfXHPQsVq69R0LaUpMbd6bkIPf7pm0zPjZOO+AUbkp6efHmJSRKlqxuLte4l GdxB2VxeV4YjCZWibVsJLu71lNNOrLOdo1ee1Qj0nMaW2zAMQwmbNwjQAtNMX3DDZQBE +mO3LCczCv+gRcwaX5empU7CB8uNAGauY3MdFjuPEA7YZ8WZLCgRkwBpecWW86cCKpw1 Niev6KjFAleBOqKZkgNZuwmfCB7unxnNkC8VdByWYoOfhnmAg1yeHGgwXTH90+d1dnA/ 46ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Du4MsZg/glfLsACkWt4Gh7Tp3tFJWcmPYFYVoz1w/hs=; b=ORzs4Yk/r5XLncCJCx8NNhnZluKNunxvZgmU92HAp3mQES5aemZ0L5x7YdcoI8ZQYH P3lgZaswNNDxszPbq2f0ryf4aOHCciExotSJrWlOSHjAE1kyYbXaW6O+cioMClbS58i2 Ut93wlYD3pVIAfUqqFJjTvVDT56tvVQCG79WfbDkhHsqHGJMYHqihOAGsvM4DSf/6ayu 73dtAODmshTtBJcJNtYcL1Y2nZLP1Rt/fAaC9MAk7zQ/lKglNnYqNg7KPO9568Cr7eCb +iZDOwh9lNCkBQq27Y1tPD8kczErrfStaaF7YCdp2YRMwklqGW22MkeHVf7dwOl/GrhR yGxA== X-Gm-Message-State: ANhLgQ36D8Qh5AYdh+AuM23LVo4PfUHqBoq4ujD4izrOIvmvcIXIBQ8d JDoMZJ8vVCieXSu4ZootCuI= X-Received: by 2002:a17:902:7687:: with SMTP id m7mr9719029pll.136.1583633343358; Sat, 07 Mar 2020 18:09:03 -0800 (PST) Received: from ?IPv6:2405:4800:58f7:4735:1319:cf26:e1d9:fc7c? ([2405:4800:58f7:4735:1319:cf26:e1d9:fc7c]) by smtp.gmail.com with ESMTPSA id b2sm13510065pjc.40.2020.03.07.18.08.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 Mar 2020 18:09:02 -0800 (PST) Cc: tranmanphong@gmail.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, keescook@chromium.org Subject: Re: [PATCH] scsi: aacraid: fix -Wcast-function-type To: Bart Van Assche , aacraid@microsemi.com, jejb@linux.ibm.com, martin.petersen@oracle.com References: <20200307132103.4687-1-tranmanphong@gmail.com> <26713759-34ff-5c47-95bf-83723e8eac39@acm.org> From: Phong Tran Message-ID: <6e78c52e-c02b-dea2-c5a5-7acf4c9b9fb1@gmail.com> Date: Sun, 8 Mar 2020 09:08:58 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <26713759-34ff-5c47-95bf-83723e8eac39@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/7/20 11:35 PM, Bart Van Assche wrote: > On 2020-03-07 05:21, Phong Tran wrote: >> correct usage prototype of callback scsi_cmnd.scsi_done() >> Report by: https://github.com/KSPP/linux/issues/20 >> >> 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..92a1058df3f5 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 = (void (*)(struct scsi_cmnd *))aac_probe_container_scsi_done; >> >> scsicmd->device = scsidev; >> scsidev->sdev_state = 0; >> > > Since the above cast is not necessary, please remove it. > yes, sent v2. Regards, Phong. > Thanks, > > Bart. >