Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/808472/?format=api
{ "id": 808472, "url": "http://patchwork.ozlabs.org/api/1.2/patches/808472/?format=api", "web_url": "http://patchwork.ozlabs.org/project/sparclinux/patch/1504222183-61202-23-git-send-email-keescook@chromium.org/", "project": { "id": 10, "url": "http://patchwork.ozlabs.org/api/1.2/projects/10/?format=api", "name": "Linux SPARC Development ", "link_name": "sparclinux", "list_id": "sparclinux.vger.kernel.org", "list_email": "sparclinux@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1504222183-61202-23-git-send-email-keescook@chromium.org>", "list_archive_url": null, "date": "2017-08-31T23:29:34", "name": "[22/31] sparc/led: Use separate static data field with with static timer", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "cd405c66ae82d3d95c7225c3ee7f3aba6d079ebb", "submitter": { "id": 10641, "url": "http://patchwork.ozlabs.org/api/1.2/people/10641/?format=api", "name": "Kees Cook", "email": "keescook@chromium.org" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/sparclinux/patch/1504222183-61202-23-git-send-email-keescook@chromium.org/mbox/", "series": [ { "id": 926, "url": "http://patchwork.ozlabs.org/api/1.2/series/926/?format=api", "web_url": "http://patchwork.ozlabs.org/project/sparclinux/list/?series=926", "date": "2017-08-31T23:29:34", "name": null, "version": 1, "mbox": "http://patchwork.ozlabs.org/series/926/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808472/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808472/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<sparclinux-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=sparclinux-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"AwpXh9zZ\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjzRG1C2Lz9t1t\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 1 Sep 2017 09:41:30 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751854AbdHaXl1 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 19:41:27 -0400", "from mail-pg0-f53.google.com ([74.125.83.53]:38196 \"EHLO\n\tmail-pg0-f53.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751856AbdHaXjV (ORCPT\n\t<rfc822; sparclinux@vger.kernel.org>); Thu, 31 Aug 2017 19:39:21 -0400", "by mail-pg0-f53.google.com with SMTP id b8so3116829pgn.5\n\tfor <sparclinux@vger.kernel.org>;\n\tThu, 31 Aug 2017 16:39:21 -0700 (PDT)", "from www.outflux.net\n\t(173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133])\n\tby smtp.gmail.com with ESMTPSA id\n\tw64sm926500pfi.75.2017.08.31.16.39.17\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 31 Aug 2017 16:39:17 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=UmkS+GSn5Pq6if5CNaP4Phi74mJ0rVJFcD1+NJZ/T/k=;\n\tb=AwpXh9zZRYYRNz6Ohcpq9B8XwGy5SFU3c2XceLiZpT0orKsI9s9z4XAZpf1WAXYDbA\n\tL7zzptmvSazU+4kTnRji2iyfvStI0oskoCsdyxk4/AhRHUST6xUupgrblAY+iHX0nK5v\n\tVAWwMVTe9dlKrYOFjjdrk98XkGcX3UPHZ4Jpc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=UmkS+GSn5Pq6if5CNaP4Phi74mJ0rVJFcD1+NJZ/T/k=;\n\tb=OErFjwUG9Eo345d5l1bA6ZnLViCLQPXPYthnMvkiyoCrdoElB3EndWcgSnH7l2e3+w\n\tn4y/hcKFT6c0YImggQHlpUfEFvAOliapJdOK3syZePw5dek9cixy61Kn/6PrHrZAs02M\n\tIRXpIzBx0zR7TYxy+KJkfO+WWe7ujKs3Bp4xF76QENo6GiERXIGBYEKbhT1L+ePlVK9x\n\tDr9pAhDCzy6wcpY63LKyN3OVXHk7knuFfafEcvWgKSfZsqMDlL9HqY4xVhO7Urld3K/T\n\ttYwIzoH/soRz5Oitq7m3ezsD7gBpnVRDbbM4rtOKMaP2Sbz0yyp3Mnb6D3ta1Crs9MTZ\n\t1cgA==", "X-Gm-Message-State": "AHPjjUhIzyD7gJwUEbWqxX/OMtF5Z3whIHx+9WoemqeUlqBPoOJZqoaT\n\t5n/jg9bfKJwCB+m8", "X-Google-Smtp-Source": "ADKCNb784xnaQ9xC93ilDSzRHxn6X7kLt5wig/4RuSMXyRKI+iCYQsWZXHy3fCgh9iEIeM31gwTGjA==", "X-Received": "by 10.99.110.1 with SMTP id j1mr136076pgc.329.1504222760866;\n\tThu, 31 Aug 2017 16:39:20 -0700 (PDT)", "From": "Kees Cook <keescook@chromium.org>", "To": "Thomas Gleixner <tglx@linutronix.de>", "Cc": "Kees Cook <keescook@chromium.org>,\n\t\"David S. Miller\" <davem@davemloft.net>, Ingo Molnar <mingo@kernel.org>,\n\tGeliang Tang <geliangtang@gmail.com>,\n\tsparclinux@vger.kernel.org, linux-kernel@vger.kernel.org", "Subject": "[PATCH 22/31] sparc/led: Use separate static data field with with\n\tstatic timer", "Date": "Thu, 31 Aug 2017 16:29:34 -0700", "Message-Id": "<1504222183-61202-23-git-send-email-keescook@chromium.org>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504222183-61202-1-git-send-email-keescook@chromium.org>", "References": "<1504222183-61202-1-git-send-email-keescook@chromium.org>", "Sender": "sparclinux-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<sparclinux.vger.kernel.org>", "X-Mailing-List": "sparclinux@vger.kernel.org" }, "content": "In preparation for changing the timer callback argument to the timer\npointer, move to a separate static data variable.\n\nCc: \"David S. Miller\" <davem@davemloft.net>\nCc: Ingo Molnar <mingo@kernel.org>\nCc: Geliang Tang <geliangtang@gmail.com>\nCc: sparclinux@vger.kernel.org\nSigned-off-by: Kees Cook <keescook@chromium.org>\n---\n arch/sparc/kernel/led.c | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)", "diff": "diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c\nindex e278bf52963b..382860e482e0 100644\n--- a/arch/sparc/kernel/led.c\n+++ b/arch/sparc/kernel/led.c\n@@ -31,19 +31,20 @@ static inline void led_toggle(void)\n }\n \n static struct timer_list led_blink_timer;\n+static unsigned long led_blink_timer_timeout;\n \n-static void led_blink(unsigned long timeout)\n+static void led_blink(unsigned long unused)\n {\n+\tunsigned long timeout = led_blink_timer_timeout;\n+\n \tled_toggle();\n \n \t/* reschedule */\n \tif (!timeout) { /* blink according to load */\n \t\tled_blink_timer.expires = jiffies +\n \t\t\t((1 + (avenrun[0] >> FSHIFT)) * HZ);\n-\t\tled_blink_timer.data = 0;\n \t} else { /* blink at user specified interval */\n \t\tled_blink_timer.expires = jiffies + (timeout * HZ);\n-\t\tled_blink_timer.data = timeout;\n \t}\n \tadd_timer(&led_blink_timer);\n }\n@@ -88,8 +89,10 @@ static ssize_t led_proc_write(struct file *file, const char __user *buffer,\n \t} else if (!strcmp(buf, \"toggle\")) {\n \t\tled_toggle();\n \t} else if ((*buf > '0') && (*buf <= '9')) {\n-\t\tled_blink(simple_strtoul(buf, NULL, 10));\n+\t\tled_blink_timer_timeout = simple_strtoul(buf, NULL, 10);\n+\t\tled_blink(0);\n \t} else if (!strcmp(buf, \"load\")) {\n+\t\tled_blink_timer_timeout = 0;\n \t\tled_blink(0);\n \t} else {\n \t\tauxio_set_led(AUXIO_LED_OFF);\n@@ -115,8 +118,7 @@ static struct proc_dir_entry *led;\n \n static int __init led_init(void)\n {\n-\tinit_timer(&led_blink_timer);\n-\tled_blink_timer.function = led_blink;\n+\tsetup_timer(&led_blink_timer, led_blink, 0);\n \n \tled = proc_create(\"led\", 0, NULL, &led_proc_fops);\n \tif (!led)\n", "prefixes": [ "22/31" ] }