Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp717700imm; Wed, 18 Jul 2018 09:27:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcG1WNZ4c/1qpb59ikM1e5dkmsKpvg3G33Zw9uq9BTDwYddlwyqZn7UQIDXfsmauDXc4Jjj X-Received: by 2002:a62:c60e:: with SMTP id m14-v6mr5884939pfg.40.1531931226479; Wed, 18 Jul 2018 09:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531931226; cv=none; d=google.com; s=arc-20160816; b=jOFRYVpPGZIEEAPzC2Gn8jtJUZQvA+4n6WwgEMIn4+xeSK1w5na/ujp4dDTAAI9V8w uLCmYVA/nTQoZibJD3QEDwGK3MTF/Reh6RuT0c1Rpd2C/aT0GUImf776vmkHQfJRiBlU 5fzcL4QWzcBksqztFgTJiYKwLFN+n6hjlCaUugllxPs3G/EnxtbPxZwSIn0Y9VPaOQi+ NLEXqSyp1Q/2ClyDktHLwwP2IJezgOW0r7q/w+OVAEatXduClg+1+hTU2LTr14pHwHLA ZZoUGGLnpafhFw00iWp7wYqOvQb5uK2ZBVwxlrs9ESYe0N64XfDhCKXhUye27EnLTcJz npNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=8YMZ0uZa465zrChzYNNUEs0iuerWlknGVO71+drWNmY=; b=X8dUb8uVg/nimJxCFLBZ+3qX2yscnEJxxJDvVZ4nq6Eg9GijXpfyWTVoqv3MrwhFIu WxB3VMHoA3yiqwQN+RBg0I0PaaokUJ2MV2N4xx2BGIfLgg/4++bkMzIsjgUzQap3ejld 6aPOxoWAd1ZCjKHwNIXAoiZ+FCO/Dup+9g6CRYX+x5CxFiVexVjSoebsqaxC4inwhuZx WAFMYpzU7DjUKVza9vg/Xh2AHTymH2qaHrIBDzHeUgGxRac++5O91/UpAbJk9Bu8kZ4G Z6w+xMHI+sycDp7UQXiwu1tkWpxmeiXx7M6xnQlMLWJgFLxY6R5heZHbrDQGMvK1oR+l 8KWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X6EQTfw0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z125-v6si3681988pfz.10.2018.07.18.09.26.50; Wed, 18 Jul 2018 09:27:06 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=X6EQTfw0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731558AbeGRREo (ORCPT + 99 others); Wed, 18 Jul 2018 13:04:44 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:44019 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731586AbeGRREo (ORCPT ); Wed, 18 Jul 2018 13:04:44 -0400 Received: by mail-ua0-f195.google.com with SMTP id x24-v6so3297865ual.10; Wed, 18 Jul 2018 09:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8YMZ0uZa465zrChzYNNUEs0iuerWlknGVO71+drWNmY=; b=X6EQTfw01/EbU/g4vkjBxULOrV33EsdIrqyZnnxv/7hTFV44eASxEd+DdavM/Momtk cwVE6ApnwudrcSrhAXCzidqQl/CE+xqdCxOisqcGivxQpWaC9bWsz0+Id9pU6rU+tvIR ceQ6dOgN1Vpnkhi/z2nqyuWLLz7ONQMFXJQBvC7OisiigglqAeF/1aAfcIs8uQz0DaN3 zOWA1qL2KJMAjg0P/J+LMgzhT5VG6ut77iHeBjUZ07MvmL4TliqJMq1YNWnvgC+MPihI H1ZtJO3AlAyFQ6nkX2T7h67WvVIDp69vj3ElsZxYd8RHDfGz1O9hU+qswi3B5sV8aeb8 dDFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8YMZ0uZa465zrChzYNNUEs0iuerWlknGVO71+drWNmY=; b=WVoUZDnBOvM4Q/0jFb/knCFpGk6PyOicyp/1h94s/R9MqkmFoQoCm/em/2mEnHBTR9 7YZWEICLmDvhJ6rSoBHNCTa1kDGNV0UMNMlWFS4qF2GwNdJBWGwsOCNm0RsoWCcsO+TX EcNXtTJ5uoJbW19C0LJ6M+N/DCiRZQ1KRejLorrqyvDKQu6B7ABOZwOfxlygEkMfdt/D bIaa7OMe75lInJ6y5JUI/vgc9NZtvwCDUUn0cAoT2cQ0/Pe8lM/0QLfKZCoU0FuxcLvb YdZAG823n34/hm0a9uBpyHdNEdKFBwCQLM9Yv2RnIIuaJwhTbnQ6gXyuREkSFM8B5KuC qlGQ== X-Gm-Message-State: AOUpUlFQCywPJtSvOKWdMLhDyktst6gvJAg6M6uVG36D5FqJvemtaC3O ObJva5u7EkKYEaxnrAO98HEd/t1WCxvPO/pSztCkMw== X-Received: by 2002:ab0:70a9:: with SMTP id q9-v6mr4255638ual.141.1531931164229; Wed, 18 Jul 2018 09:26:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 09:26:03 -0700 (PDT) In-Reply-To: <30d6b568-b785-ae93-9f56-d0a8b7e82901@micronovasrl.com> References: <20180718094006.105675-1-giulio.benetti@micronovasrl.com> <20180718094006.105675-3-giulio.benetti@micronovasrl.com> <30d6b568-b785-ae93-9f56-d0a8b7e82901@micronovasrl.com> From: Andy Shevchenko Date: Wed, 18 Jul 2018 19:26:03 +0300 Message-ID: Subject: Re: [PATCH v9 4/4] rtc: ds1307: add frequency_test_enable sysfs attribute to check tick on m41txx To: Giulio Benetti Cc: Alexandre Belloni , Alessandro Zummo , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 18, 2018 at 5:06 PM, Giulio Benetti wrote: >>> + int ret; >>> + >>> + ret = kstrtobool(buf, &freq_test_en); >>> + if (ret == -EINVAL) { >> What kind of other error code you may expect and why they are not >> considered as no error? > According to documentation, kstrtobool can only fail with -EINVAL. > See: > https://elixir.bootlin.com/linux/v4.18-rc5/source/lib/kstrtox.c#L332 That's correct. So, what do you want to show by explicitly mentioned an error code in the condition? -- With Best Regards, Andy Shevchenko