From patchwork Sat Jun 23 10:22:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Gilbert X-Patchwork-Id: 10483507 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 8A74A601C8 for ; Sat, 23 Jun 2018 10:22:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C5F728CF0 for ; Sat, 23 Jun 2018 10:22:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EE4528D36; Sat, 23 Jun 2018 10:22:27 +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=-7.9 required=2.0 tests=BAYES_00, 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 E03F528CF0 for ; Sat, 23 Jun 2018 10:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751608AbeFWKW0 (ORCPT ); Sat, 23 Jun 2018 06:22:26 -0400 Received: from smtp.infotech.no ([82.134.31.41]:36539 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbeFWKWZ (ORCPT ); Sat, 23 Jun 2018 06:22:25 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id 4FB662041F1; Sat, 23 Jun 2018 12:22:23 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z5BkGvgQr0sa; Sat, 23 Jun 2018 12:22:21 +0200 (CEST) Received: from xtwo70.bingwo.ca (80.92-221-215.customer.lyse.net [92.221.215.80]) by smtp.infotech.no (Postfix) with ESMTPA id 789D020419A; Sat, 23 Jun 2018 12:22:21 +0200 (CEST) From: Douglas Gilbert To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com, hare@suse.de, bart.vanassche@wdc.com, jthumshirn@suse.de Subject: [PATCH v6 1/7] scsi_io_completion: comment on end_request return Date: Sat, 23 Jun 2018 12:22:14 +0200 Message-Id: <20180623102220.5438-2-dgilbert@interlog.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180623102220.5438-1-dgilbert@interlog.com> References: <20180623102220.5438-1-dgilbert@interlog.com> 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 scsi_end_request() is called multiple times from scsi_io_completion() which branches on its bool returned value. Add comment before the static definition of scsi_end_request() about the meaning of that return. Signed-off-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Douglas Gilbert Reviewed-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 41e9ac9fc138..8ac2fa6256da 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -662,6 +662,7 @@ static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd) cmd->request->next_rq->special = NULL; } +/* Returns false when no more bytes to process, true if there are more */ static bool scsi_end_request(struct request *req, blk_status_t error, unsigned int bytes, unsigned int bidi_bytes) {