From patchwork Thu Jul 10 13:01:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 33421 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2F90C203C0 for ; Thu, 10 Jul 2014 13:01:56 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id va2sf48045581obc.10 for ; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=O1XL+knkvbMYvUApEJHgLj4GIpErzWwZIxnzA9stTGg=; b=Xt0sO0G3PTBvxLiX3sgCqL4AnPNYoIwGjSkkowHoQLIS9+xVFTVbmaJfyPPAQO65EJ O8eX+sL9+6ph8t3Syl8ReaXiL7SVfUAq8ItRwTWbYWknZUmtShAefBcOXUh6MRGPrC1l DJxk8VDLpmjJmaQUrDNTHRdMJU98DTxPT+JLvwwcD1WgoI4Tqj2YzdY9Gl5QSlCq392p xO2Bx/Jgjkxoxif6UBahKBQ6b6eRRJWgcoAX2ncNeJkv4CTA9oVWdpF9wpsvISMRvb2B EG1Of5irILlsOj/UUEyxqo1x3OIJn1RhhpCCZfjzIJTx3PYfg8aodm/1zRErdL5yxsYk FIOA== X-Gm-Message-State: ALoCoQniDhlmXBWxq3d+VnH9RBjEvsNXiT9BXUyLMNSpXoaZVTyQMwfsV/Jl8EDqGY6QpFWT43Yx X-Received: by 10.42.208.72 with SMTP id gb8mr23417532icb.24.1404997315804; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.195 with SMTP id b61ls63798qgb.50.gmail; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) X-Received: by 10.58.56.102 with SMTP id z6mr44325719vep.7.1404997315683; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id xa4si22897099vcb.12.2014.07.10.06.01.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jul 2014 06:01:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id la4so10656768vcb.28 for ; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) X-Received: by 10.220.200.71 with SMTP id ev7mr384443vcb.24.1404997315594; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp130818vcb; Thu, 10 Jul 2014 06:01:55 -0700 (PDT) X-Received: by 10.68.226.105 with SMTP id rr9mr267528pbc.161.1404997314772; Thu, 10 Jul 2014 06:01:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si8545481pdp.127.2014.07.10.06.01.54; Thu, 10 Jul 2014 06:01:54 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753566AbaGJNBb (ORCPT + 28 others); Thu, 10 Jul 2014 09:01:31 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:36841 "EHLO mail-ie0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752992AbaGJNB1 (ORCPT ); Thu, 10 Jul 2014 09:01:27 -0400 Received: by mail-ie0-f174.google.com with SMTP id rd18so7207690iec.5 for ; Thu, 10 Jul 2014 06:01:27 -0700 (PDT) X-Received: by 10.50.4.5 with SMTP id g5mr21496855igg.14.1404997287156; Thu, 10 Jul 2014 06:01:27 -0700 (PDT) Received: from localhost.localdomain (c-24-245-18-91.hsd1.mn.comcast.net. [24.245.18.91]) by mx.google.com with ESMTPSA id d4sm24960026igc.5.2014.07.10.06.01.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Jul 2014 06:01:26 -0700 (PDT) From: Alex Elder To: akpm@linux-foundation.org Cc: ak@linux.intel.com, bp@suse.de, jack@suse.cz, john.stultz@linaro.org, pmladek@suse.cz, rostedt@goodmis.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] printk: fix some comments Date: Thu, 10 Jul 2014 08:01:22 -0500 Message-Id: <1404997284-20844-3-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1404997284-20844-1-git-send-email-elder@linaro.org> References: <1404997284-20844-1-git-send-email-elder@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: elder@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.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes a few comments that don't accurately describe their corresponding code. It also fixes some minor typographical errors. Signed-off-by: Alex Elder Reviewed-by: Petr Mladek --- kernel/printk/printk.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index ac2b64e..646146c 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -113,9 +113,9 @@ static int __down_trylock_console_sem(unsigned long ip) * This is used for debugging the mess that is the VT code by * keeping track if we have the console semaphore held. It's * definitely not the perfect debug tool (we don't know if _WE_ - * hold it are racing, but it helps tracking those weird code - * path in the console code where we end up in places I want - * locked without the console sempahore held + * hold it and are racing, but it helps tracking those weird code + * paths in the console code where we end up in places I want + * locked without the console sempahore held). */ static int console_locked, console_suspended; @@ -146,8 +146,8 @@ static int console_may_schedule; * the overall length of the record. * * The heads to the first and last entry in the buffer, as well as the - * sequence numbers of these both entries are maintained when messages - * are stored.. + * sequence numbers of these entries are maintained when messages are + * stored. * * If the heads indicate available messages, the length in the header * tells the start next message. A length == 0 for the next message @@ -344,7 +344,7 @@ static int log_make_free_space(u32 msg_size) while (log_first_seq < log_next_seq) { if (logbuf_has_space(msg_size, false)) return 0; - /* drop old messages until we have enough continuous space */ + /* drop old messages until we have enough contiguous space */ log_first_idx = log_next(log_first_idx); log_first_seq++; } @@ -1476,7 +1476,7 @@ static struct cont { struct task_struct *owner; /* task of first print*/ u64 ts_nsec; /* time of first print */ u8 level; /* log level of first message */ - u8 facility; /* log level of first message */ + u8 facility; /* log facility of first message */ enum log_flags flags; /* prefix, newline flags */ bool flushed:1; /* buffer sealed and committed */ } cont; @@ -1881,11 +1881,12 @@ static int __add_preferred_console(char *name, int idx, char *options, return 0; } /* - * Set up a list of consoles. Called from init/main.c + * Set up a console. Called via do_early_param() in init/main.c + * for each "console=" parameter in the boot command line. */ static int __init console_setup(char *str) { - char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for index */ + char buf[sizeof(console_cmdline[0].name) + 4]; /* 4 for "ttyS" */ char *s, *options, *brl_options = NULL; int idx; @@ -2045,8 +2046,8 @@ EXPORT_SYMBOL(console_lock); /** * console_trylock - try to lock the console system for exclusive use. * - * Tried to acquire a lock which guarantees that the caller has - * exclusive access to the console system and the console_drivers list. + * Try to acquire a lock which guarantees that the caller has exclusive + * access to the console system and the console_drivers list. * * returns 1 on success, and 0 on failure to acquire the lock. */