Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp720726ybh; Sat, 7 Mar 2020 08:36:52 -0800 (PST) X-Google-Smtp-Source: ADFU+vvShIgVl3ZpHU34wNY7+hPGouYBcpum2bwG3pVJPF3sKiTdE0xUh6O3gJmha4UQ5dKMH4gU X-Received: by 2002:a05:6830:1bc3:: with SMTP id v3mr7265789ota.310.1583599012146; Sat, 07 Mar 2020 08:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583599012; cv=none; d=google.com; s=arc-20160816; b=CxBCz4ShCWQvUNt/mMeeW/qsRtcaV7qAfP5YvyyuZWQ540SW5/XrSzEoCevlM3vD7J up5YUqaP+gEwiDMUWu9BXblQbiLkKzO0t2qRwX1Z6z/N/Paf8tzwe3o1PxsgOqd7cFhW DOWutNCFkZtYbJt3LpD+n5+WVsG+RnK734AM3vd2W7W39y8T4iK+ywx8+TGSegmZtHbI P1OpSeG80Jx+cAF/eDA3WAR5uVQgNB3C8C8f49C656GGZ/wV4PtzueOa1VPAg9Ngm8ah E02extyhtvST+f9tMB6Su3rxOEEZyCYBmzoskE1lextHASdnYI+OzKHPficDRXUXQHFy 9Qug== 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:autocrypt:from:references:cc:to:subject; bh=Cg5Oac7HLMeEEjCIuNmhZwN3uMpxeRRyG9r8siwTeQg=; b=G3xEtDitOmjFI2tAXYCCIrJY30e6WvfsyMArQs3ju4rqgtnr9E6yRTmXY4Q+FRluwu SMewyPoejyu8ILeUihc0lVIqaI3F+q6CDUDnl9qHGpurtWVlTPKXiqIuBHDf3ezCXIF9 iUEM6tlPmInC9TfZGNVYJkLVhQYUjdAmcQ7eLnd1mtlSgXNcY2DcbPRzcRZTtLPOZLTB keoiJwHzF/khCPh6pgTC2rFnV5c33hA1p7n8xyPS5stfBMNSv33tMKrhnZo2NAE65U7x 8pGXg4q6vOwygUccF1xdGcmJuh5bmGwuPVn4zvi3kgORYkXnnkgTlwZDfG86hAtx0f2V 989A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si3215591ota.299.2020.03.07.08.36.38; Sat, 07 Mar 2020 08:36:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726295AbgCGQfo (ORCPT + 99 others); Sat, 7 Mar 2020 11:35:44 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:52643 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbgCGQfo (ORCPT ); Sat, 7 Mar 2020 11:35:44 -0500 Received: by mail-pj1-f66.google.com with SMTP id lt1so2402773pjb.2; Sat, 07 Mar 2020 08:35:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Cg5Oac7HLMeEEjCIuNmhZwN3uMpxeRRyG9r8siwTeQg=; b=rCykOpBuboU4+wNbBDIR1EW+yk1ZLh3rWYk6VzRj2917REQz2LrWnukjN/GqokgDuV vgWn1kPHvM8J8kt8J4sCZXlzrLNSGPX6fIZLMfjb7kPWR+MN/rxKa8SKjlUpNmMfyP9Z L9m2nuFxzeDpr3wQ5kpcUthuS0lBs4325h6jnlhiTeAolqs0qJoJQCtD9XDCbnYvi48C AH60K80Pghu4fhOKci8fuZHCJHlMjbopJ8EKgs+zytvtNSgWIV9Trw5PONJMRJIxAXsi y19xS9psfIw1JYjgsOuq/G2xLLpRmcMCP1MxPOSVYwo/NoNDozYAFPzJXzkilC2utpb9 jRdw== X-Gm-Message-State: ANhLgQ0T1qH6VB87UAOMymKh+Q+ileKQ3GXAu4MeG9jPBgzKAEWMUmgI 0bouaCRGVr71WAZeJvsBXqo= X-Received: by 2002:a17:902:aa04:: with SMTP id be4mr8630576plb.41.1583598941703; Sat, 07 Mar 2020 08:35:41 -0800 (PST) Received: from ?IPv6:2601:647:4000:d7:e84b:4a82:674e:2e4d? ([2601:647:4000:d7:e84b:4a82:674e:2e4d]) by smtp.gmail.com with ESMTPSA id i197sm37506627pfe.137.2020.03.07.08.35.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 07 Mar 2020 08:35:40 -0800 (PST) Subject: Re: [PATCH] scsi: aacraid: fix -Wcast-function-type To: Phong Tran , aacraid@microsemi.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, keescook@chromium.org References: <20200307132103.4687-1-tranmanphong@gmail.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5xialliWU447Bts8TJNa3lZKS1 AvW1ZklbvJfAJJAwzDih35LxU2fcWbmhPa7EO2DCv/LM1B10GBB/oQB5kvlq4aA2PSIWkqz4 3SI5k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G22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <26713759-34ff-5c47-95bf-83723e8eac39@acm.org> Date: Sat, 7 Mar 2020 08:35:39 -0800 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: <20200307132103.4687-1-tranmanphong@gmail.com> Content-Type: text/plain; charset=utf-8 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 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. Thanks, Bart.