From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AB52C433EF for ; Fri, 5 Nov 2021 15:16:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0C3060EBB for ; Fri, 5 Nov 2021 15:16:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E0C3060EBB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7usFpVXRzX2YEJ/GwJ0s1Trt2qVWncJ2lfToWU/ByEg=; b=dXSWRPIesct3dT d0zPRnreA0yNaHtWk2ejaxoIOish+pq3N8X0qFYi0OQuxaiHJSjYMapV6KJeZ0+jh9PoOb7tODCBI 7vHHRnMavgRvte+QqIT+8mCdyf6Kw29QU7Aq+mj2Uh4akoz1MR5FEgC4gompk27E4QSBnY5B4qN/J IaFYuHKcZs4MmZd5Dqa81WPNpBRknZH77Il4ZwpJna7WAiMyb7XRxLjufPdUsWJv81t30ARrJDkBJ iiz6e/poRH6lyuQ4Hz//5w7aOU/uKjsE+bD5hS3LMMhvHXeYqUfAWiT+McFPR6VriIHL3UFy75yqQ oe6ttGiJWRWzsUYt2KiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mj0vP-00Bg8P-UA; Fri, 05 Nov 2021 15:14:40 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mj0vM-00Bg7d-IB for linux-arm-kernel@lists.infradead.org; Fri, 05 Nov 2021 15:14:37 +0000 Received: by mail-pj1-x1029.google.com with SMTP id x16-20020a17090a789000b001a69735b339so3591248pjk.5 for ; Fri, 05 Nov 2021 08:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nnHVWr/JLQ/giaq/yHDXfmSji6/e+JJxcUykqE8B89M=; b=oHdbuefenRoP6A2SUrVt0mVVYw0O0CW6sQv8g9B6tJUKTDX0hFwFdWaLcbQrNWbEza oIorq9MPBFM0ZA2sIYw6r3ZDRej20wciO/bDi6vFl0Lm8QvdjI+3a+wvMn+m1PuiOO4M DONChc/dMn6Ck84Y/i5s3lf4NuVZB81l6BgHoA63Ky4hduAbohAkNeAORgfKH3bAzaUG zAAyszjg7VwhJUfCCNSgtM0v4YBFrX4vTaKOJXAcfQKNU1AtMUYK3hYDb6mZibxxOdtA LSpdxes6f6cC7Lae6S4OqqIvpH1g2EkUAu1SQ4aWnzu5hsVp5uMG3u5+S/0GPC+BvvMK VBLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nnHVWr/JLQ/giaq/yHDXfmSji6/e+JJxcUykqE8B89M=; b=o4HsXuj51PYPJ9RXni8CiQW2RhpC/wM0mZil7Rw+oNU0socKMNx++GY6J+pwktwIwY 5Qvhp+nERj2C7VM9Cp6WU0dfXHBCM1CvrStpwHaS43Z2zDUgsri1u/sWsAveYayNRG7L c7WIcjLc28rjpSdNzM0+Ck1c6mu562PtzVq649pqtXRyEEBIWMgxt/BwOr2A+EqcRlD0 b7u+DUESZhc8u9EQl0pD63MFPFPoo1pOyx8yGhtL9G+qfkoAAWiELCJEiyuHji0IqBz1 i8S/8Idp8OUjCVXYV45fGvC222cBjtfEggqZOMFVDYxy8htEFTVtwuwbwbdYtojZwxyl 7sqg== X-Gm-Message-State: AOAM530Jyr7T0xl45ekdxSHXWlhtn5b5/HEpDKoC9cw4vaNkZjFfE16R Qp9v62rGSTwy7C8T41kyHNhuOg== X-Google-Smtp-Source: ABdhPJy85qpd8h14Lrp5hGuSpR6/fN9CbJmNDaHHOjCwIDzB5ivhXD7IjpIlSiJLeDcBbRej731vNw== X-Received: by 2002:a17:902:e8c9:b0:141:6eaa:2137 with SMTP id v9-20020a170902e8c900b001416eaa2137mr51571039plg.22.1636125273019; Fri, 05 Nov 2021 08:14:33 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id x1sm7678485pfr.148.2021.11.05.08.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 08:14:29 -0700 (PDT) Date: Fri, 5 Nov 2021 09:14:25 -0600 From: Mathieu Poirier To: Jinlong Cc: Tao Zhang , Suzuki K Poulose , Alexander Shishkin , Mike Leach , Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tingwei Zhang , Yuanfang Zhang , Trilok Soni Subject: Re: [PATCH 04/10] Coresight: Enable BC and GPR for TPDM driver Message-ID: <20211105151425.GA827656@p14s> References: <1634801936-15080-1-git-send-email-quic_taozha@quicinc.com> <1634801936-15080-5-git-send-email-quic_taozha@quicinc.com> <20211103194300.GA383984@p14s> <20211104111323.GA14135@jinlmao-gv.ap.qualcomm.com> <20211104170224.GC491267@p14s> <20211105081750.GD25738@jinlmao-gv.ap.qualcomm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211105081750.GD25738@jinlmao-gv.ap.qualcomm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211105_081436_633336_BC8DB3AB X-CRM114-Status: GOOD ( 20.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 05, 2021 at 04:17:54PM +0800, Jinlong wrote: > On Thu, Nov 04, 2021 at 11:02:24AM -0600, Mathieu Poirier wrote: > > [...] > > > > > > > + > > > > > +static ssize_t reset_store(struct device *dev, > > > > > + struct device_attribute *attr, > > > > > + const char *buf, > > > > > + size_t size) > > > > > +{ > > > > > + int ret = 0; > > > > > + unsigned long val; > > > > > + struct mcmb_dataset *mcmb_temp = NULL; > > > > > + struct tpdm_drvdata *drvdata = dev_get_drvdata(dev->parent); > > > > > + > > > > > + ret = kstrtoul(buf, 10, &val); > > > > > > > > The coresight subsystem normally uses the hexadecimal base. > > > > > > > > > > We will address you comments. > > > > > > > > + if (ret) > > > > > + return ret; > > > > > > > > Shouldn't this be "if (!ret)" ? > > > > > > > > > > When ret is not 0, it need to return. > > > > I would expect something like this: > > > > $ echo 1 > /sys/path/to/tpdm/device/reset > > > > and not > > > > $ echo 0 > /sys/path/to/tpdm/device/reset > > > > The latter is what the code does. > > > > Thanks, > > Mathieu > > > > Hi Mathieu, > > The ret is the result of kstrtoul not the val. > Ah yes, you are correct. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel