Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4103718imw; Tue, 12 Jul 2022 01:42:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sF/jZdr+ydT3Ul2iDFkarOttBiI6LA9Rx3X9uS3/VaAmOBgLi6lEhC+h8MS/VVsW+f4/Ch X-Received: by 2002:a17:907:6d26:b0:72b:3a72:a117 with SMTP id sa38-20020a1709076d2600b0072b3a72a117mr15840824ejc.280.1657615351593; Tue, 12 Jul 2022 01:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657615351; cv=none; d=google.com; s=arc-20160816; b=tm7/i3I+vBKw9TnWAqD7D2OAWrs6elnLB715d1BCevj1hayCVkPFv5Cv4YX6aBjFxK 13XnUkqTAwZ3RdRfyFwsEHKs/sYgPyBkvgDtmFYCqWJW7A/wtzr71ZuEbVUxDfVqQs14 difGZeQor0ewklHsZoJ7UvnLq3KFYGX6DafZCngNocqYnolncWXYLFAePk28Qz2cklbC xJgfOo8wAJPabalN4y1SAjWLOLdipnoh7icZm/ce2Yw+ZYjpL923txKDos1mgwMul63/ ijzk/jf01uyocV7UkzG24d6QK7+V6WFWS63Ooh+PGeEV9hPXpvnIo+txfUQyM/8p6XXQ eITg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=S+qr/rB1qp3jjME/ZnJzZQtFse2L01G1JMoWBlVLSGU=; b=SLetS0rmuwkcoeebTxpu8b5rKESB53IUneAwK5XUps0SkGD8Ept7X86D8aCfpCZUIt /nI6srHHMLXDcGXUnyM7vlgqBTNpR3SU8CkaY4+QkrSB2rcHWF+KHNzpATqvL3ztGEM8 HO7QZfnW/Kg5ogMz5K6WQRFq4QwSU2JCtKjJDp94E/3W5D/vupSWQrhfmIMWAhWmfFAh VajX/sVDAARsnG0RBqaZ0vffkzpTyiuNBwVbivX2LLjVxxALKulUUFGKZK7HL4wv77V+ LU9HBS2lZl0Yw5+FEgZDkGyE2nBJwtwShpFbNKw3SGnYFc3ru3azkmV9as38GtmhEwoE 7AbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=D9uRYKok; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a1709065d0f00b0072b1433b2e7si6408262ejt.300.2022.07.12.01.42.05; Tue, 12 Jul 2022 01:42:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=D9uRYKok; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232542AbiGLIAH (ORCPT + 99 others); Tue, 12 Jul 2022 04:00:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232417AbiGLH76 (ORCPT ); Tue, 12 Jul 2022 03:59:58 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 437439B54B; Tue, 12 Jul 2022 00:59:57 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id o7so12584481lfq.9; Tue, 12 Jul 2022 00:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S+qr/rB1qp3jjME/ZnJzZQtFse2L01G1JMoWBlVLSGU=; b=D9uRYKokFim4JLJO9gvLlORuIh6vcIUQJfDCoZKNyWB35esEUVUh/49prmxrSVqZwV 3KQ1TeNXyy/4v9rfTGx1At0tvDe26KiAp4lF+NNjE0yzw2mg2iHXSmNUVLtGn/ZiOTs9 ROTw/puBgp1n1TEeFXFQWpIUSiW/kG7hjZjmTHNq7uU8AuMMyDsB5wclUERNySepNxP/ +xEhyP0MKwMwQLBTEIjajP4XfENyyWToPSpmEMm19FCMtste/xtaECL+wPeUbUu/sFXt Z3h+62Qa9RN2XgHk2DQ6ceN8TshvjagwtjpSHeauWhdI3v4m9FW6jPd3dqs4vCMo3csa hBFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S+qr/rB1qp3jjME/ZnJzZQtFse2L01G1JMoWBlVLSGU=; b=RHQ8zf5hpMbq0HALb447qwQkVi36Z3F5eDK0RQJSzszR2A6y698BFR9uMFU3Qreykh nDUjw+aFbdP916cOBqiFP4Rwu35O+KSCQQEIGvIz7WD8T5fhVXIVOmOE91im95EyJQd2 WP2twYfuq0MF/ofAbcznCvh1SysaSiXW+/MmC7et1UAIGB+KRLeRwuXTBwAMhScGQCWh p7zJ1WY5BPvITBcYUC2pK8djw+pzXfJPcG79vGZKzaORoH4Fnob+8Zwe08SN8rU7FVIK l3Ayu9VELvEKog5X9b1/pRLt1hIufkmdRqlyXGEA1PcwmoPmugAokm2OM43qn1Voo54L ZbEg== X-Gm-Message-State: AJIora+5F42WyGH3/j4TeAbdIcgla3Rnqdy2GaNWWsjkiqM1ErTFVue8 fJY/G6PfcsojpamWn7jI9WrXb0wys7aNNYkg4tg= X-Received: by 2002:a05:6512:324a:b0:486:a915:7b70 with SMTP id c10-20020a056512324a00b00486a9157b70mr12988761lfr.265.1657612795528; Tue, 12 Jul 2022 00:59:55 -0700 (PDT) MIME-Version: 1.0 References: <20220711134312.234268-1-tmaimon77@gmail.com> <20220711134312.234268-3-tmaimon77@gmail.com> In-Reply-To: From: Tomer Maimon Date: Tue, 12 Jul 2022 10:59:44 +0300 Message-ID: Subject: Re: [PATCH v1 2/2] iio: adc: npcm: Add NPCM8XX support To: Andy Shevchenko Cc: Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= , zhengbin13@huawei.com, OpenBMC Maillist , linux-iio , Linux Kernel Mailing List , devicetree Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, Thanks for your comments, they will be addressed next version. On Mon, 11 Jul 2022 at 17:16, Andy Shevchenko wrote: > > On Mon, Jul 11, 2022 at 4:14 PM Andy Shevchenko > wrote: > > On Mon, Jul 11, 2022 at 3:59 PM Tomer Maimon wrote: > > ... > > > > struct device *dev = &pdev->dev; > > > + const struct of_device_id *match; > > > > + match = of_match_node(npcm_adc_match, pdev->dev.of_node); > > > + if (!match || !match->data) { > > > + dev_err(dev, "Failed getting npcm_adc_data\n"); > > > + return -ENODEV; > > > + } > > > > > > + info->data = (struct npcm_adc_info *)match->data; > > > > Instead of above > > > > info->data = device_get_match_data(dev); > > if (!info->data) > > > > return -ENODEV; > > Or > > return dev_err_probe(dev, -EINVAL, "...\n"); > > if you want that message to be issued. > > > -- > With Best Regards, > Andy Shevchenko Best regards, Tomer