Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp191368imm; Tue, 24 Jul 2018 16:57:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdwEJvBaOuicAqMUshW64Igdm9QuVtHyVHMfxFvW2KkGg6Bo1R/YMCDeAurnkMsldBaDJu6 X-Received: by 2002:a62:9d14:: with SMTP id i20-v6mr19709985pfd.3.1532476636429; Tue, 24 Jul 2018 16:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532476636; cv=none; d=google.com; s=arc-20160816; b=JEMwzb/OTUbQAfGScfOuBysYtmd1/uCZ9fo1SNuPdLJKNknSC2nkdu+gwCUolTWj4Q GAuk4c/IUU/yxypAoDn5PxM3Nj8u319/vqVIFksTcT5F3ngi7cUUZNELAAcBxd+TY0UX 1iY3aIvbOKT5b6UJU1orsi6vvH7TC4WfoKvvIrrYavy4zoylJ2T2iReKsm4NYS71VTfV tFEsFRzmwLayGLqhcsc52kDcM7dlM7SHS+0985Twxy3OnLQgZCp5iTuUO4seGfHv1irQ I6wtt7dZ0QR+p2Mwo7e16eYC4hSbVIuNI4AFMpii9I1k8OQnV5RNremNaKoEU9WOhrWQ l7lA== 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:dkim-signature :arc-authentication-results; bh=13suI+NySlNOezUVpqPUPtUeoenar1/HobLOiyny9gQ=; b=IPDcr9VFMpU7OsJWShb8gSLLKJLhTfmHAzWGnLfPe+BELmd9K8q/rQMt4WSNPDaPt1 kOgtzGqJR5DyMmIByfvvMy1JNXW60MkXTZOHrCuIBVan2RCjoQufAFStMQ+NBzWZ8bjR 21sx4d3auW4ExjGUiQ9OytuSwl8nyPezPc9jsn/hgMCSpKP8eR3dHuJwXYfuOPZYdF0z FJFyFURE97HPjlgSmRyOj+B+wK0nNS7yhxoeKlVqRD3l8cmqcXuuy5J4YYVxYF6ZcXly BjDvpHPS0TofWIE2qzXFWYdonEGe2OAbgrlzTmJP6ZH+FxmPXE9Zlt/UGcou/JJw2xyQ YcrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=JBIBzkaH; dkim=fail header.i=@chromium.org header.s=google header.b=foB+saIW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2-v6si11257963plp.459.2018.07.24.16.57.02; Tue, 24 Jul 2018 16:57:16 -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=fail header.i=@google.com header.s=20161025 header.b=JBIBzkaH; dkim=fail header.i=@chromium.org header.s=google header.b=foB+saIW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388562AbeGYBFG (ORCPT + 99 others); Tue, 24 Jul 2018 21:05:06 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:45279 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388536AbeGYBFF (ORCPT ); Tue, 24 Jul 2018 21:05:05 -0400 Received: by mail-vk0-f66.google.com with SMTP id b78-v6so2931077vka.12 for ; Tue, 24 Jul 2018 16:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=13suI+NySlNOezUVpqPUPtUeoenar1/HobLOiyny9gQ=; b=JBIBzkaHg7llrQG/gCyJoAhb8aGhVq78xsWBdMQoioqseGnsctYqlz4m3C8ZwW/1mY kUzLfeMfc6ekwHy37V5BskuYESLQuqsRJ6kUBgII1fnNxvXCPLjPHloGmuZQbzqNK0A6 WpsVkQfKetH/R9z+P6xisj92OoTrrtE1H/FYVgf2BjAxPYWotxLj4eqnnMEZqyzWVLti 3KdMr/yu2h2b+rS6vRwsdkHZbEh1FnuvqrUN0h8Qwpmpa+Q9p84daHN8V85GewXx918U 8LqqGEIH9Uj1PPd5ZnlKt14RSvX8UZzdzp2QcXxBIfWuqDGZY5v9wx5Fc44facB8mZat dlxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=13suI+NySlNOezUVpqPUPtUeoenar1/HobLOiyny9gQ=; b=foB+saIWzYNl8pZ0ImqhswmvH54Asl/vkYtoD14Y/dDvHi97CR3tNBK3jjYEvjTPnL ZnIeDDkUsLo5uQbZxVJx6JmMGfSPiSNhecsB2MNSucKv+Aq/fkNLrJ4hizKLoB4CWmeE dxxcW7mamyYHVQFexi0DLG9ZobNe9dBUkvzis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=13suI+NySlNOezUVpqPUPtUeoenar1/HobLOiyny9gQ=; b=KlGa90zbFXjE0/f1xUf94QPePbckoz/Kmu/5YKvh3RwIiXJI6i9QekJY0C0eme6eV3 fj3bS43ZqGEZCggI+3bcvt1ZAXDoSy86W9Wc/waoiPSQMn3+Y/SeD75hgcu2YvzliBdP koK1N3dPLYJeTSyOTnza9e+ol8yN5JeN3JmOOYXdtjuS0Ut1jvKEwrrWIYS/rwUTVl9b HdcAibUDjrdoQOWcTECUOBuOLqqEKjjZ/1v78Vt/DBU013CpOgqX5q0Yr92ZI15qRwaM 46swSeKtFulrdA6MjFtdjeiKEUCblCYJUDxezldcjeTxNaJ202N3vJiAOHqSp9YwLsIv EwrQ== X-Gm-Message-State: AOUpUlGjVzEgoGyV4CjelhzEwweVeqcwQYb3BbhTqkZZE0Y+SUFBg2fD G0bpRNC06DZaJoudSJGn/z6IvWwVBvEnTKZX6BHOxA== X-Received: by 2002:a1f:a784:: with SMTP id q126-v6mr12093472vke.70.1532476568673; Tue, 24 Jul 2018 16:56:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:cd5:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 16:56:07 -0700 (PDT) In-Reply-To: <20180724071223.18901-1-daniel.thompson@linaro.org> References: <20180716210241.9457-1-daniel.thompson@linaro.org> <20180724071223.18901-1-daniel.thompson@linaro.org> From: Doug Anderson Date: Tue, 24 Jul 2018 16:56:07 -0700 X-Google-Sender-Auth: TORWiFlUHDz8ZqXn0vLQxeyJku4 Message-ID: Subject: Re: [PATCH v3] backlight: pwm_bl: Fix uninitialized variable To: Daniel Thompson Cc: Lee Jones , Jingoo Han , Thierry Reding , Bartlomiej Zolnierkiewicz , Marcel Ziswiler , linux-pwm , dri-devel , linux-fbdev@vger.kernel.org, LKML , Patch Tracking 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 Hi, On Tue, Jul 24, 2018 at 12:12 AM, Daniel Thompson wrote: > Currently, if the DT does not define num-interpolated-steps then > num_steps is undefined and the interpolation code will deploy randomly. > Fix with a simple initialize to zero. > > Fixes: 573fe6d1c25c ("backlight: pwm_bl: Linear interpolation between > brightness-levels") I think it may be incorrect to word-wrap the Fixes line. A quick grep through the source code looks like others agree. > Reported-by: Marcel Ziswiler > Signed-off-by: Daniel Thompson > Tested-by: Marcel Ziswiler > --- > > Notes: > v3: > - Switch to the simplest fix and zero the uninitialized variable. git > grep indicates that ~25% of calls to of_property_read_u32() use this > pattern (pre-initialize optional properties with sane values and > ignore the return code). > > v2: > - Simplify SoB chain (with Marcel's permission) > - Separate complex if statement and make other similar calls use same > return code checking approach > - Tidy up comment formatting and fix pre-existing grammar error > > drivers/video/backlight/pwm_bl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Other than the nit on the commit message, this simple fix seems sane. Reviewed-by: Douglas Anderson