Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp647808ybt; Wed, 24 Jun 2020 07:57:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzblS4NaavYjH6LHuS8MQpnYgcRxpr7NmHug2aiMkavm1ph/1IxC1I5FWX2VyHooNu7FYAu X-Received: by 2002:a17:906:4f87:: with SMTP id o7mr24904338eju.233.1593010646696; Wed, 24 Jun 2020 07:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593010646; cv=none; d=google.com; s=arc-20160816; b=eUNXzCetJIo2Gg70abbF3IsRBMia9/R46+Z7tN5/cyBwL1cgqhfVRiqTVAz/cqN6aH wdcwHL/cSxV6xWpSNNSo4Se4GaDDzYcY/Wi684/thgjF2Qukk57WrqML+7+TgL1gPKXL o3GYEAjX9lJfztfuuJ+oSQDvogOb+5vdoUNaasE0XivSfCYWYaLJTzvj/8XMpZYmytmy hgo5QjYLcx5GcXrp+pYfxbna3xsZxt+0M5fbENf1AFjNms52Zt5yUZJbYhUx7QV1WbmD l7IOJpIvFq/Lmv7dqwiIYOHuwXGPetba2LZibWggIhW8jzNe3Xg9iUjoIHIUbPbLfWHo WoGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+sk9R2kZOJxwPKjhGy5eQURJ6u1u2IjgStnunJ+u8Vg=; b=iqlwBBBqTzQfyWVqdz5N7bz2On6zk9ZnFNC7hGf3esZ+tNvvB+eWJAxZrRD5gxPqdy VhRgiDcnB8Ue6nrYbwnRlGpoK0SrErIoxONe55+U9SQ/nZahB3rPihzKpDBPun2AMQ0b ogZJbc8c4oReC4KOCf0qDR1ELy94WR0H9/FPfLNX1qTmFGDnowktxTKs+kzQ22rVmOgR PxF6N/EW50hD+FX65aXdyiDF0xxUo0FDECZuJ8DIrkDBRoBiTdJ4FYmAA6f0j6RQU4N5 b151Y8gA4zAc9m9k+ywQ3wdL95j8Jn95YP3nNm1+DK6FViKRwpn35ug2MKT/qMZCXxtj eUFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si2816244ejf.336.2020.06.24.07.57.03; Wed, 24 Jun 2020 07:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404023AbgFXO4A (ORCPT + 99 others); Wed, 24 Jun 2020 10:56:00 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:40280 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403931AbgFXO4A (ORCPT ); Wed, 24 Jun 2020 10:56:00 -0400 Received: by mail-oi1-f194.google.com with SMTP id t25so2060208oij.7 for ; Wed, 24 Jun 2020 07:55:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+sk9R2kZOJxwPKjhGy5eQURJ6u1u2IjgStnunJ+u8Vg=; b=V/T2excaFLJWF8U1Jqu0oXKyUtZpWOG89KgjTHDGpfyJte97C4ZFOm7BM7jsPJ3FUM VXuDgugWLhwsJ6ceUHVlQ+d40LGs/Jyu8abycCua01IhPm0JA5XTrYMv8ceD9VXBG1U2 jEakGiyyvWXviCgvdY0RnbJtkfJoyQAEgr8vYKdsHCDBsa0se0RzDnXUmG/rHtAcjlTF VcEbQxORqsY+RerwIcd6NFMPIPUqCFVCkZCm0VBCYLmXuviIEC1FGFSM2uhTLBjscIiq AuuZPP0UT1HK5s4AZ3/kgRSU/ne+3E5rOA2jz5p6kX8gAfb8CcfXVegg6vu3tJnp9viG 2zBw== X-Gm-Message-State: AOAM532WWgbiWhrPT0+/rwY/pdOijohuaR0V/2wsbRZ6HMybTA09l/3t owFctFoC2eSHKmqqqBdtz8XNymCsVpzEw7zOdo3gtw== X-Received: by 2002:a05:6808:99b:: with SMTP id a27mr2709013oic.68.1593010558890; Wed, 24 Jun 2020 07:55:58 -0700 (PDT) MIME-Version: 1.0 References: <20200624114127.3016-1-a.hajda@samsung.com> <20200624114127.3016-4-a.hajda@samsung.com> <345c10ba-b047-3ef4-0129-0ef494c8f812@samsung.com> In-Reply-To: <345c10ba-b047-3ef4-0129-0ef494c8f812@samsung.com> From: "Rafael J. Wysocki" Date: Wed, 24 Jun 2020 16:55:47 +0200 Message-ID: Subject: Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types To: Andrzej Hajda Cc: "Rafael J. Wysocki" , Jernej Skrabec , Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz , Linux Kernel Mailing List , "open list:DRM DRIVERS" , Russell King - ARM Linux , Neil Armstrong , Jonas Karlman , Andy Shevchenko , Mark Brown , Laurent Pinchart , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 4:44 PM Andrzej Hajda wrote: > > > On 24.06.2020 14:14, Rafael J. Wysocki wrote: > > On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: > >> Many resource acquisition functions return error value encapsulated in > >> pointer instead of integer value. To simplify coding we can use macro > >> which will accept both types of error. > >> With this patch user can use: > >> probe_err(dev, ptr, ...) > >> instead of: > >> probe_err(dev, PTR_ERR(ptr), ...) > >> Without loosing old functionality: > >> probe_err(dev, err, ...) > >> > >> Signed-off-by: Andrzej Hajda > > The separation of this change from patch [1/5] looks kind of artificial to me. > > > > You are introducing a new function anyway, so why not to make it what > > you want right away? > > > Two reasons: > > 1.This patch is my recent idea, I didn't want to mix it with already > reviewed code. > > 2. This patch could be treated hacky by some devs due to macro > definition and type-casting. Fair enough. There is some opposition against the $subject one, so I guess it may be dropped even. Thanks!