From patchwork Sat Jan 24 01:43:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 43716 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01CF9218DB for ; Sat, 24 Jan 2015 01:44:32 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf259622lbj.2 for ; Fri, 23 Jan 2015 17:44:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FY8a8QxN6EoOxf51KuhJ9o/RpdVUyr4BxEpMy5hwUrc=; b=mdn7PFT5CADL25gcK+nkEjtE3XfZYSSeb5wuoTMTg0WmKYF+BRqn2IRV10F5bHbFPg 5aARa/HvBfEDnZxY0ILu81EVdQbUjBwoqSh8XxWPkM8C82tTf2xYa74UWM/uwfNtyMsz zjqlNqgyWSSlb3lfeFJegZAKMjL3yY1ZfljXfpeWwKY13LILs5pN4XBaf4JTYd1AEsYO fTBtxhPLVGIffduOkqhpkXI5B0Hvf5Qttyxr0jz5XqYjRXdzXAnP5632WFWHvRMQ4ECv MBemR8AG5RCGoiFOUYrXh7+5DqLleb/+/W0rUsoalMI6irYhDIgxM4Z0VwB9ec36lvGl jrBw== X-Gm-Message-State: ALoCoQnWc14d36yZgoKMdff4gifbTucHrh9emG+7ownL2mj04ebqao/lpzpyqRvXQ+3EjRHQ1pyp X-Received: by 10.152.37.130 with SMTP id y2mr89268laj.8.1422063871036; Fri, 23 Jan 2015 17:44:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.71 with SMTP id z7ls361256lag.92.gmail; Fri, 23 Jan 2015 17:44:30 -0800 (PST) X-Received: by 10.112.13.103 with SMTP id g7mr10409624lbc.29.1422063870828; Fri, 23 Jan 2015 17:44:30 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id bj4si2841506lbc.69.2015.01.23.17.44.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Jan 2015 17:44:30 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id z12so471575lbi.7 for ; Fri, 23 Jan 2015 17:44:30 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr10404597laa.80.1422063870732; Fri, 23 Jan 2015 17:44:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.35.133 with SMTP id h5csp90297lbj; Fri, 23 Jan 2015 17:44:30 -0800 (PST) X-Received: by 10.68.227.6 with SMTP id rw6mr15912184pbc.2.1422063861226; Fri, 23 Jan 2015 17:44:21 -0800 (PST) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com. [209.85.192.179]) by mx.google.com with ESMTPS id rg9si3921040pdb.133.2015.01.23.17.44.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Jan 2015 17:44:21 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.192.179 as permitted sender) client-ip=209.85.192.179; Received: by mail-pd0-f179.google.com with SMTP id v10so1004267pde.10 for ; Fri, 23 Jan 2015 17:44:20 -0800 (PST) X-Received: by 10.66.250.225 with SMTP id zf1mr16107576pac.31.1422063860341; Fri, 23 Jan 2015 17:44:20 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id ci17sm3111170pdb.70.2015.01.23.17.44.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Jan 2015 17:44:19 -0800 (PST) From: John Stultz To: lkml Cc: Xunlei Pang , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , John Stultz Subject: [PATCH 7/8] rtc: Remove redundant rtc_valid_tm() from rtc_hctosys() Date: Fri, 23 Jan 2015 17:43:59 -0800 Message-Id: <1422063840-2837-8-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422063840-2837-1-git-send-email-john.stultz@linaro.org> References: <1422063840-2837-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Xunlei Pang rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Cc: pang.xunlei Cc: Arnd Bergmann Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Xunlei Pang Signed-off-by: John Stultz --- drivers/rtc/hctosys.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c index 2153b52..6c719f2 100644 --- a/drivers/rtc/hctosys.c +++ b/drivers/rtc/hctosys.c @@ -45,13 +45,6 @@ static int __init rtc_hctosys(void) } - err = rtc_valid_tm(&tm); - if (err) { - dev_err(rtc->dev.parent, - "hctosys: invalid date/time\n"); - goto err_invalid; - } - tv64.tv_sec = rtc_tm_to_time64(&tm); err = do_settimeofday64(&tv64); @@ -63,7 +56,6 @@ static int __init rtc_hctosys(void) tm.tm_hour, tm.tm_min, tm.tm_sec, (long long) tv64.tv_sec); -err_invalid: err_read: rtc_class_close(rtc);