Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp407034ybl; Fri, 10 Jan 2020 00:27:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwX8NKaRwbc63FvX172CHp/nt+twnKCCZiEpIclVgEvRmZvbPBR+bYIiIG1d2XKUjwE230C X-Received: by 2002:a54:4715:: with SMTP id k21mr1358218oik.163.1578644853377; Fri, 10 Jan 2020 00:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578644853; cv=none; d=google.com; s=arc-20160816; b=avpROVQpQdg8MMBBVdH17FZvCElnmBgvyQfBHoNEgEHDrHbrrnrSPdNmwbuDiNfR2+ k9dmiTxbf5U8hxzNplR6/vexRk6bhFDBK3F+xbTtP9MEjfVGQeKF3BPNP0R1F146tjB6 A4unYvSCpmERPz3CboK1sN/jP3PM5SK18pY4Khdv0UuEp97PDhUrA+tSMkkCSdKQuZH7 6b4lITfHQd0iVuIdbHqI4k4578bn07ck6uc5K5ek1JRHzNfqgn+QjuJrZoqYrc/DFP47 9xA/8xPb5QpmamiXv6pcyrWBgtrDfCJr9lb/I0POW1/Hl8jQEt4An5G/MzpclwVn7j9c yGMw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1Mpto8STXUyff3SuN++CYO1ReCNV8kLrYeZBrybALQQ=; b=kvkH4Tg1QRHe7tAZ6O3RQtSwR5FnKDjY0v1Bqvp8ErL3ovjb4gDhb2c1WLaIPOTRpf Owv9PF3s5eKpUQA09UTYXrzyjA/3Mlazf55BUD4Gw5zD3EONXsIGYx3XGntBNKpyxteb /R2fnb8HS7rc6pBokwvtZeUlDIqf9hyriAamJSm20rEwRMFvEoZFE8R2kU93c1iw0p1w e9/Yh3KGrdrjvEu5VejRz873t8ISKncahwNe83suzr8odz3q4JI/NIOoOKIzjMsBn2WV vLJx3bquNKw/SbfAzkEjOnp7HZ7Ha6dhYSo8wNmSIa1Vh/OLlJ2CZsZMJNoWBLi4bVJn gr2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=FmZBjhTY; 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 i5si794723otr.293.2020.01.10.00.27.22; Fri, 10 Jan 2020 00:27:33 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=FmZBjhTY; 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 S1726989AbgAJI0X (ORCPT + 99 others); Fri, 10 Jan 2020 03:26:23 -0500 Received: from mail-il1-f196.google.com ([209.85.166.196]:45659 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbgAJI0X (ORCPT ); Fri, 10 Jan 2020 03:26:23 -0500 Received: by mail-il1-f196.google.com with SMTP id p8so1108230iln.12 for ; Fri, 10 Jan 2020 00:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1Mpto8STXUyff3SuN++CYO1ReCNV8kLrYeZBrybALQQ=; b=FmZBjhTY7sbuVMCk14C7YB05gIcPfuYjlNIumlGDZGFcvL9gObsjtxhanIt0aREDY1 yUeIS8tRAPx+xK3UGSEaWYkiRO6HMJDB1w5gMx3egYwW8iw+taMQqD6wf+Fz3B1IguUZ gXmgP459EmWBqG/zTFJFLAf9Ld7XBOOGKvG25VSlDIggvxvbJB+c0l8G9jWUCN2bAPp9 2/rlDZbRvbUUVKzTKnJTFHfi1mQ48le2Uh00ABoAjSYICDDKPXgw1LGelTw8lXqf2h9J 2ryN5q5rA/42FuIsp+SglWAZtS0a4JdZvTqF1APhypxIZ0KQE9tEi1LRKXhfYLYe9ay1 B7Vw== 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:content-transfer-encoding; bh=1Mpto8STXUyff3SuN++CYO1ReCNV8kLrYeZBrybALQQ=; b=Kyq6RmR+zoKYmlyNhv/sgrAhgQYe1kfbD69n64reM1W+zPKxmLiNnNh0XruJlXarzM /SOLvtJMcafguRZXRLnKfIWBZ6sg1kFGmZrq/X+VLVQHHNkcCFdjHYmO7XTtP1flhEX4 f5mCWNy7iAZ5Q25HV+a5e+XpKdI6rDQSygAREJszqign5ourNjZbWhGikK4x3wmuBpAj aLrbjxpqe452KQBs0FGww0u/EN28U2mJKqYMlJ6OvSjUPrKOApeHup5+sdbvzD0bNBV4 VcfwpS8QCpvQzlqw/O8Bugh13TmLmz+obpzWeTqGTFHFNbMyvqFAVOhCRfV9p4eGMB03 LgUg== X-Gm-Message-State: APjAAAVXrlVEL0/1+Zap0bdpEthTtyZV5hBtTZTE8UzuIxpIIEdQfI/a 9ehgWbHnnDtE3tOYC2ZhwMsEMNJy50XYPeU4w8n2Fw== X-Received: by 2002:a92:8712:: with SMTP id m18mr1633334ild.40.1578644782463; Fri, 10 Jan 2020 00:26:22 -0800 (PST) MIME-Version: 1.0 References: <20200110082441.8300-1-brgl@bgdev.pl> In-Reply-To: <20200110082441.8300-1-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Fri, 10 Jan 2020 09:26:11 +0100 Message-ID: Subject: Re: [PATCH -next] nvmem: fix a 'makes pointer from integer without a cast' build warning To: Srinivas Kandagatla Cc: Linux Kernel Mailing List , Stephen Rothwell , Khouloud Touil , Linus Walleij , Bartosz Golaszewski , kbuild test robot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 10 sty 2020 o 09:24 Bartosz Golaszewski napisa=C5=82(a= ): > > 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 > --- > 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 nvme= m_config *config) > nvmem->wp_gpio =3D 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); > -- > 2.23.0 > Srinivas: this fixes a bug introduced in a patch I took through the at24 tree. With your ack I'll apply it as a follow-up. Bart