Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4940826imm; Tue, 16 Oct 2018 02:34:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV62mgz47iz/o7nUHSrZe7icUihmKDyw4CI/WEz6Y31lJsGAP7WUlAhaGcQIGMSHSDRdQ+3PF X-Received: by 2002:a62:6c4:: with SMTP id 187-v6mr20965448pfg.109.1539682479269; Tue, 16 Oct 2018 02:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539682479; cv=none; d=google.com; s=arc-20160816; b=JamjbILkgjniTIz+kmWr+S41x3jRLgfOwTxiXL+DsaeBJTpJJITU+oTwvWCW4Cr8r1 bQSZKqFoCgUMC6SenbUrCZ9Hg55NIY4nvokIr7Jag3Yq/h2FLug9uhdWhDxWNyYOVP37 birXO1nk0//ofLKAXJIVfuD8hM19PhThlLzLfi81U7gjDn2+xvDRLvh5wvI7m/N/GF1i gvejxi4j2IKbCckj9UBu/LuZOnP+CfegpJMeR1Z7sD1c5vOzQSsnoyGiYtfcPuSVO4rE cQuWrDcm8FfYzYrHAWVvfFDQ9DKsbXV/mCtzLej/krTzH/LfyBWAY88A65NPgCdHVAZO JwSA== 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; bh=XpwMWF9wn2vBMVdm3IOvbkOiC41hNBD9inkuqet9OGY=; b=qup3u4mrXK6aFE9GZvON2mCC9gLzwHcEMGpsoWwuo1A/XkkVvrLdceqbp5LrKRsSpg 12IKDSTT/MtTSJVKGJwch8N+fH1SddFWsEUs99E0RDo9eXgObjvt46VeFO+8zFNjkN9T tcUkY6VMzHZUibV8x84Dm+kd2TucQViFGiAOAh3jZVYRG3biiDX/ttp8ZqtUud16Inq+ dyNqUvQj4IcqDfncMy6Fx5iYTOj2Jl+NB8tUgCHEj8BUUiEAgGyp9ijZI4Wgov+dHLrt 8m2qSy1zuRX/A7iIFlAfIDpM+wls8tX2ep6DJOQy1Ktlz46mzNCQ+Q6O1T9xtDEQ7mOF l5Xw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u22-v6si14578658plk.293.2018.10.16.02.34.23; Tue, 16 Oct 2018 02:34:39 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbeJPRWL (ORCPT + 99 others); Tue, 16 Oct 2018 13:22:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43192 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbeJPRWL (ORCPT ); Tue, 16 Oct 2018 13:22:11 -0400 Received: by mail-wr1-f67.google.com with SMTP id n1-v6so24628563wrt.10 for ; Tue, 16 Oct 2018 02:32:37 -0700 (PDT) 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=XpwMWF9wn2vBMVdm3IOvbkOiC41hNBD9inkuqet9OGY=; b=dg9fsKFIGwxU0eZAxfi6ZgErY9cPj3ckIK7hWNtroNi7zWsFxc7K59+JxLnqFafich RwUhxPwOeRn2b5z57d+jKhMPX72hVHvTzx8P+AJng7406PonEaGjPjULHm0ufChcyWQb IyN274bNgZvHXRkpQ9Z+uw7efpboFLKy25jV0Ja3BK+v80NNiZume3UktmcwdKlettAP 5j1ah2BV5YudBo5aJ4pP8geFrDpBe4EUOzUQOYPw3CZnlevJReeYxidBn8yJrlWsz9Jv uGUIWwPrLtLN3DrShIOq0kpaMg82vwfeDqYwuGHk+VVUoCyKtEcWdvM1ugZ/Zg3ay4SC lG7A== X-Gm-Message-State: ABuFfohlzx4VR3tEoJN2FEtGS+JLod0y9ZV7+cPlMfhUZxYfNVovfsuB nkRsMmVQmClJwP0PKjYD2+OV9g== X-Received: by 2002:a5d:4cc3:: with SMTP id c3-v6mr18569511wrt.75.1539682356689; Tue, 16 Oct 2018 02:32:36 -0700 (PDT) Received: from [192.168.1.13] ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id g10-v6sm11151014wrv.49.2018.10.16.02.32.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 02:32:36 -0700 (PDT) Subject: Re: [PATCH 1/3] driver core: add probe_err log helper To: Andrzej Hajda , Greg Kroah-Hartman Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, andy.shevchenko@gmail.com, Mark Brown References: <20181016072244.1216-1-a.hajda@samsung.com> <20181016072244.1216-2-a.hajda@samsung.com> From: Javier Martinez Canillas Message-ID: Date: Tue, 16 Oct 2018 11:32:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20181016072244.1216-2-a.hajda@samsung.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 Hello Andrzej, On 10/16/2018 09:22 AM, Andrzej Hajda wrote: > During probe every time driver gets resource it should usually check for error > printk some message if it is not -EPROBE_DEFER and return the error. This > pattern is simple but requires adding few lines after any resource acquisition > code, as a result it is often omited or implemented only partially. > probe_err helps to replace such code seqences with simple call, so code: > if (err != -EPROBE_DEFER) > dev_err(dev, ...); > return err; > becomes: > return probe_err(dev, err, ...); > > Signed-off-by: Andrzej Hajda > --- Reviewed-by: Javier Martinez Canillas Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat