Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp508699ybl; Fri, 10 Jan 2020 02:18:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyLUyzDmzkf/uMx5SlOZ+ovpH1gOLkKEF+rNdh4DMQHAZH0xXNWveWkmuIplBdoDtZ/QpbA X-Received: by 2002:a9d:6859:: with SMTP id c25mr1900398oto.205.1578651499264; Fri, 10 Jan 2020 02:18:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578651499; cv=none; d=google.com; s=arc-20160816; b=LjN1W+HBW+BOl5atDXNIRtV3NsyIItTysc2hHkvDxpJaRdZ0/iiSirJGW22jO/kA2H UKy30VrdHUl/Sm9TRYlAOZLWClpza/bqsuvldwG+R1FGZKd9Ixz10oJzpaRSXqNlhdzC d2JXotRYxiNw6sA9qEbt4GXQgz+iEIYStuHmigNDe0pTO/SnlMcAv5VRr7kzcXDt7lMU EIqVroH3goBnC5viklI8SAas+QPW8t2jIyEj8MJZp5VaYg+kjAAbOUMm3KhXbnBNa/IH 3fOTIQ+voF32f46JgDpo6N2dpBFKEwvbupQbGKhJjWscUiflEKXAqpEspGgaFiGJof9X E7gw== 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; bh=kJcJ3Z4R5O84gZeCwxxOsOYiPBXfsGpmbGOuOvGKfLU=; b=ulJh9tGZ6YSwTB/hhlICP9PEytL9IexAap7yV+6r2Ggm50aceSG1PKSujyK8FmCgdk B60nbjj00uV99QYyovRrw+o4XZr+U0noeHza4qTikUnL5OiEYdW0IKTA06OQY1fwufoc Sm2oUePj5asXsnOyHliQOcJKdAyJlisRuAMmhFxCV3xj3tlmRpUIZ6F7zjVsh3i0fTb3 fDHwCjIcZNP8tK8QLnkzt3JipftgeKj8K/aZxf5K7nbDScn5mHf+aYsYXGzPR0xIAOlL AWCrvOPKe41js75pIncd4x3LDTuK+LstasxtKEpbyQl/ZadR1UNshxYXEyzXVUcu7KeY /GYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WC57lZpe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y126si805364oiy.235.2020.01.10.02.18.07; Fri, 10 Jan 2020 02:18:19 -0800 (PST) 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=@linaro.org header.s=google header.b=WC57lZpe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727435AbgAJKQJ (ORCPT + 99 others); Fri, 10 Jan 2020 05:16:09 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53715 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbgAJKQJ (ORCPT ); Fri, 10 Jan 2020 05:16:09 -0500 Received: by mail-wm1-f66.google.com with SMTP id m24so1363964wmc.3 for ; Fri, 10 Jan 2020 02:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kJcJ3Z4R5O84gZeCwxxOsOYiPBXfsGpmbGOuOvGKfLU=; b=WC57lZpeU1EKop2f9LUfJAg0AHr9oR5rtcFEMs3p0v2qn/5EYxPqx46Y2rmsyge8EY /rcwSWq073bel2NfqTfXjxzzbkR/mvUm36x9W8+SfDWjHLY3cm6gSEQjta0UjFF2myEp RqQVOiaUDfKp9gZmYyCQzLI41aAFLrUQ17BRjDnEMgQviCmNIuI0PwQHBGk3oTOAqLQx 6kHgpA8DseNx7Oys8jjSxt64aekC7OJal53HqlKDeHAJXk+AhpPQdT93oPJDWCU3vjkY v7B1fTEw9p2jAH7/YtEE+W9qXAZfsxuKN3rAfQOC/qgTlG89D8hvYdTKyxVRd61qcN8i bbXg== 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=kJcJ3Z4R5O84gZeCwxxOsOYiPBXfsGpmbGOuOvGKfLU=; b=oxONomUCeSMq3O/5FhY/RqqNFCsESrGHw1eqy8FZUahb+JRO8sNEiXI7pmRuSxX0// quAs5ST6CAHOOvkkRb+VTwR+lGP2aJ8YsgG5wTZJrz3UsTDU/oMtI0oBE53Rvrk8rtWG bXv56++HyQarZFqfybjF1+h66E30HgU4UTq/tWWavTUbcKzxofONL07rQpbRWlNibjs2 IQnb1y8SoT7yq0STl72TSPnsyvGOnqrs7o8xuu2KTS8kvfKXHIMQT69/kLWB9UQQqD5i TurTCkxUOF/gbfMxkOkpQA2mj4W3GA4qpijXL7CZRFwhPr9kLFz9bH0lOq5FMfJEMk09 hd6w== X-Gm-Message-State: APjAAAUVVA1dCT9eg+WQmv7OmHZLC2ZwoU+nDvfCjOESYPjSX+ohFFsh 0UBoPKS8eECSf56Gj24EmjbhiOVZbmg= X-Received: by 2002:a7b:c084:: with SMTP id r4mr3157095wmh.99.1578651366594; Fri, 10 Jan 2020 02:16:06 -0800 (PST) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id q68sm1772493wme.14.2020.01.10.02.16.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2020 02:16:04 -0800 (PST) Subject: Re: [PATCH -next] nvmem: fix a 'makes pointer from integer without a cast' build warning To: Bartosz Golaszewski , Linus Walleij , Khouloud Touil , Stephen Rothwell Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski , kbuild test robot References: <20200110082441.8300-1-brgl@bgdev.pl> From: Srinivas Kandagatla Message-ID: Date: Fri, 10 Jan 2020 10:16:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200110082441.8300-1-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed 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 Thanks for the patch. On 10/01/2020 08:24, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > nvmem_register() returns a pointer, not a long int. Use ERR_CAST() to > cast the struct gpio_desc pointer to struct nvmem_device. > > Reported-by: kbuild test robot > Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin") > Signed-off-by: Bartosz Golaszewski > --- Acked-by: Srinivas Kandagatla > drivers/nvmem/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c > index 3e1c94c4eee8..408ce702347e 100644 > --- a/drivers/nvmem/core.c > +++ b/drivers/nvmem/core.c > @@ -351,7 +351,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) > nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp", > GPIOD_OUT_HIGH); > if (IS_ERR(nvmem->wp_gpio)) > - return PTR_ERR(nvmem->wp_gpio); > + return ERR_CAST(nvmem->wp_gpio); > > > kref_init(&nvmem->refcnt); >