Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp976292imm; Wed, 1 Aug 2018 08:14:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdqCXF8vUzPfmFqK6FoBqf0xzFOfVVofFBsHCJnMSQ/7lAuY/DrQtUd92pXBRy+q9qzBwbg X-Received: by 2002:a17:902:728c:: with SMTP id d12-v6mr6446325pll.283.1533136472217; Wed, 01 Aug 2018 08:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533136472; cv=none; d=google.com; s=arc-20160816; b=tal5zta6v7jGGrWyoijWF15CMKCM2RFUD9F2LWMbGyfc5yGzUAu6QQ/FJtVNSVe9Ba AXUi/AeVS6z8exUdRBSCZWvkL+i8BFtIxLovdFtAXsaBH6cg+Us+WXFIrH1Ao4TRGGiD EtumRy26ndMWzv49iDUA1tbVGdBpLNAw1pZhg0I1O5ePMSihveE4mPbKXIq3UT+kfYT5 ucW3kYj/8/BUb1VeChRBBVvwlZZi9oGOcQz1TYoLhWdX+lbqWcEQx1X+4HP104Vj/kJK hPG2lwlZw/+6ud7h0lPZxaBbSExNZZHdfT9n4GER2d9bTGebL89S530FeDqgQ+rMQ3LM 63yg== 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:cc:to:subject:dkim-signature :arc-authentication-results; bh=HQMZMofm3hqnJL4ZEZex/S4NjfN6A8POx42vmJuZXt8=; b=p3VhE6DCB2/7B/XwH31UsMS0QlIWsmx3AQyHtF9ZRO+X5YBPHq7WqnPJo5Csu/dYxB zH6wLEkDMH6V73lCeMTQZdAcxBskk2GsayILZuZREgXKz1S3kHLZPd6iKqGeX+iwsGyD 0wxW8+D1C8I0Vv6HG9xUF2eyBo7vcC7r9O8WaOuq9UOE2ndDTPE5pORAwDVnQZVZixS3 Kl04jXajCa4JaE06H3Ai9kU7rcQVMXZgEM6r5VI5QQPOCaqYtoxCrw1/anXpnsH8LbUO gRkIE4b742YkL9oZVlNnToxAtdqLUmqQBzOU2iNRblHzlf9uzRerjaZbGEK0kLbzNlIS viCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=CV0q0c+H; 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 x4-v6si11534071plr.427.2018.08.01.08.14.17; Wed, 01 Aug 2018 08:14:32 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=CV0q0c+H; 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 S2389667AbeHAQ70 (ORCPT + 99 others); Wed, 1 Aug 2018 12:59:26 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:35041 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389550AbeHAQ70 (ORCPT ); Wed, 1 Aug 2018 12:59:26 -0400 Received: by mail-io0-f194.google.com with SMTP id w11-v6so16376457iob.2 for ; Wed, 01 Aug 2018 08:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HQMZMofm3hqnJL4ZEZex/S4NjfN6A8POx42vmJuZXt8=; b=CV0q0c+HdAssgboqB1Dz/kbOUAQjbmH+k7WDKtPCdj8+2lSY0sgAHdCOc9iNbQbDi8 HE000v0A6sY3OAF1cWySOwBSaTZ9784Xwa/oPVQsVgHOXABeWk1jsAEHGSUMpoBeL4+o HkwMYdzH4XJvEpIcckoS3sewuHQJERJfxd8fq0Ni7hV/GAmh+mHiY/+IAnhCT+q808eS lTUwqmRxXhAY6hGdW6lYhE0MJSQevDFoTbn/vJVNajzCI3pZV+PqsIVzTqDVihva4tMG fF6poYVEI3LKw/RG5Q//v6823w/MVzBXTMXh74iX5QjOrP5KAJVNjdD4P0KcVXoBvXbR cnpA== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HQMZMofm3hqnJL4ZEZex/S4NjfN6A8POx42vmJuZXt8=; b=NzptEUXH7FTKZDw2PJNZ9tx7JlG9SSn+UJ0EIN3WcuBHS8iEWy9w8PVZ1Q1Ow24RL3 EDBTNY8r449CYi6uaQemhtlI+BS5pv0Q4nA4waEC4PGjVwwG9L2z5F+/TwuRZe+2+fGE GZYYCwmWSHtX/183lw0F2E3R8MTdgbcVazcvoCUMAVjeVhBbZBZmIakc/1SeBU09AGhB CCpErbsrluQrtR8Co5gNsZaHXF986PjUzBXW6kP4tWxNHfLht1secKT6+tULS70wZxhM 7Se4uRsS/J1fPplS5ocefx+svoZ3Qa2fm/E4NT4jDpvvN9EeElsBLukf3McKhe3sz4Vb Vqlg== X-Gm-Message-State: AOUpUlF0ZwfXAAeCXg3PHE8rQ9OhlJYbJKDiHinx3bMd8WdgKP2drSTm V3B24umTZV2/CX/ivrkjgEHBRwz/RoQ= X-Received: by 2002:a6b:a28b:: with SMTP id l133-v6mr3935800ioe.23.1533136395832; Wed, 01 Aug 2018 08:13:15 -0700 (PDT) Received: from [192.168.1.212] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id p70-v6sm3268315itb.3.2018.08.01.08.13.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 08:13:14 -0700 (PDT) Subject: Re: [PATCH] block/bsg-lib: use PTR_ERR_OR_ZERO to simplify the flow path To: zhong jiang Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <1533053594-35244-1-git-send-email-zhongjiang@huawei.com> From: Jens Axboe Message-ID: Date: Wed, 1 Aug 2018 09:13:13 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <1533053594-35244-1-git-send-email-zhongjiang@huawei.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 7/31/18 10:13 AM, zhong jiang wrote: > Simplify the code by using the PTR_ERR_OR_ZERO, instead of the > open code. It is better. Applied, thanks. -- Jens Axboe