From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4E8AC433ED for ; Thu, 22 Apr 2021 06:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 997EF6144D for ; Thu, 22 Apr 2021 06:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234877AbhDVGf3 (ORCPT ); Thu, 22 Apr 2021 02:35:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:45198 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhDVGf3 (ORCPT ); Thu, 22 Apr 2021 02:35:29 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1FB6BAEA8; Thu, 22 Apr 2021 06:34:54 +0000 (UTC) Subject: Re: [PATCH 14/42] scsi: add scsi_result_is_good() To: Bart Van Assche , "Martin K. Petersen" Cc: Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org References: <20210421174749.11221-1-hare@suse.de> <20210421174749.11221-15-hare@suse.de> From: Hannes Reinecke Message-ID: <5fbf3fc1-88d8-62f0-aa5c-57fdb277d9d7@suse.de> Date: Thu, 22 Apr 2021 08:34:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On 4/21/21 11:10 PM, Bart Van Assche wrote: > On 4/21/21 10:47 AM, Hannes Reinecke wrote: >> +static inline bool scsi_result_is_good(struct scsi_cmnd *cmd) >> +{ >> +    return (cmd->result == 0); >> +} > > Do we really need an inline function to compare an integer with zero? > How about open-coding this comparison in the callers of this function? > My approach is to avoid direct access to the 'result' field, as the definition of which is about to change. But as this is not part of _this_ patchset I'll drop this patch for the next round. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer