Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp405711ybl; Fri, 10 Jan 2020 00:25:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzVQB1+cdcDG02A3wtwV1iwZStmBXlUDqarg9GSEjQqD0OEj41mBBAn7n4NmahhIF2gSL9b X-Received: by 2002:a9d:6251:: with SMTP id i17mr1655285otk.14.1578644752331; Fri, 10 Jan 2020 00:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578644752; cv=none; d=google.com; s=arc-20160816; b=iZ7C9+n9hyv/kXOVeT85Mlo4S7XIpXT44hg7+cex3f0mmMy51asVnEsDlzroJNPJ+s +bVwRTETenyMt0Rx3pXnNBJ68uFMR7P2obGHur6Ifxz17vRdaETEoOkpS1vZiuuqwBhU xFXMeQ7hMipWhEZarqjLZAalhtSWmuT9X7IlYRAEKzbT6u8DOoG1MkOUETFjUnorXnOJ 1htHpjdQzFdzuMzSHk5uXcaXeQyEXbdOvv4b/LViGtn0NGu8ZJYIBcboZMcWx2Algwxq wgh4umOKuou+xDYVykt85PDgqC11//kqf6cuFZ+Rd5RbnfKg9IuUbnQNOkHMxx8q+3T3 v3Fw== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5r95wsWSJ0+Wj2lVXa2ctKKmZohPNzWuPlbe6SCwck8=; b=S8YuNVwo+SET2XUhB188HxEcSjBOGr2a7NEC9ZQ4bMTa51zZh8goJUdHHjEWsYoMkM 8P9lSQpj9T58Od/SpPv3EIGPhrayh33RCBdaDM0Tt6R2ZtQtacQeREIVxLfi8IDyDSGM xT1DvDEwfbyeTTVGeMdCFHwN137R5K5YmeC0uZE8pN7WnTR6lnpC1+HkJuZOx9+quOUK +Ff5u+0UkDZXwc6Tsi8153ALx7OHToGQGxZbZdbwEDRfCDmmvxV1QfJSmCT3jIFs/bPw NqmZpJS4Y00byMCQrgH/XliSgiXPIxhSyhHuTZcovMgCi9imJl+M5IjiNsOyan5kWKmC IvbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=0fcbQT53; 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 g138si749598oib.190.2020.01.10.00.25.40; Fri, 10 Jan 2020 00:25:52 -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=0fcbQT53; 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 S1726735AbgAJIYq (ORCPT + 99 others); Fri, 10 Jan 2020 03:24:46 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55981 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbgAJIYq (ORCPT ); Fri, 10 Jan 2020 03:24:46 -0500 Received: by mail-wm1-f66.google.com with SMTP id q9so980123wmj.5 for ; Fri, 10 Jan 2020 00:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5r95wsWSJ0+Wj2lVXa2ctKKmZohPNzWuPlbe6SCwck8=; b=0fcbQT53VcbrdX8BNoj8Eety7F2Sa7j9T6cRJ+rDqlC4mCKtH38DRfSYlCdmI/rAoo zqvkECEklnoCVZ+fHOY/GOD9TEI0HXtGZqQj7h1AYc/SPWX1bRIg4PwZbEGws10HGvBn 8nigUmb1XIWj9PMrYjjL+iIbklhQWXWY+3pvte+vO8S0eLx4FsH8dKI/m/aM/dOAtssc pimkN2rtnpy27iUAewntS0XZStSLjw/Xjr92F0gcKpXM3EtdHXNXanvr4LRsYlvY+SLz kyxO5xkYHA4qX7nMuVZio5XKLjPV+iMOQZwdeerjtRiKjfbXIlcAf9PlT+1fWh8QI6Cw jy0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5r95wsWSJ0+Wj2lVXa2ctKKmZohPNzWuPlbe6SCwck8=; b=l7G1NFjYrZLMjF/JXTiTNp0dtueaoQUQTT46teg3q3IJfo2tEtNliiF8RKDKYfv9qQ kWgtQQAQudOhnXs5iE5EJhRAvPkqWig43E/zaq/GEJQQ00WwJlcbATaktPApYTeP1zMG Wam+Ynaf5tBohhEyFL1ebeXcTKtaCSiD2Xdmbs3Shz2P4B/8N6id6vVo9TbnVanrJdX1 DditSxWjnEwuAy+OH3XHhLnJfQDwFXLUrZYpWScFUR0lUH0RLXi7MCexaOjUlWPMPmXL pJIstCSA0kIbHeV4wmQtLid+MOWratEIt0jgCrvj4vilRNyfA3tOU4WFhIJlxybrd8h1 5daA== X-Gm-Message-State: APjAAAWYa2ha00SM3NeBJD0eiwWXEY++irFyWXBJROzTwiY7uYIBKHCS 32VVEd+6IQ9KZXBLaQWQvgbYtw== X-Received: by 2002:a1c:6406:: with SMTP id y6mr2724113wmb.144.1578644683946; Fri, 10 Jan 2020 00:24:43 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id x7sm1313416wrq.41.2020.01.10.00.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 00:24:43 -0800 (PST) From: Bartosz Golaszewski To: Srinivas Kandagatla , Linus Walleij , Khouloud Touil , Stephen Rothwell Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski , kbuild test robot Subject: [PATCH -next] nvmem: fix a 'makes pointer from integer without a cast' build warning Date: Fri, 10 Jan 2020 09:24:41 +0100 Message-Id: <20200110082441.8300-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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); -- 2.23.0