From patchwork Tue Feb 20 15:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 13564184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C2A8C5475B for ; Tue, 20 Feb 2024 15:35:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA91510E4C0; Tue, 20 Feb 2024 15:35:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="QDBfE6ao"; dkim-atps=neutral Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id D4C5110E4C0 for ; Tue, 20 Feb 2024 15:35:44 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4126f48411dso4690285e9.0 for ; Tue, 20 Feb 2024 07:35:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443343; x=1709048143; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; b=QDBfE6aobM7lyknRtCa5C0dT8pAVTSzIsLZXu4nGEys60GCHnJ7pIZG4l0gmfwfTHL VcFVmQKJoXnLrWJA/JkxfiyxaPoLQu5vtT85zMwQ3jDzX3xi2cRpfwJENRh4s/tKQYlJ LBIzlhmhzvq779Tj91WMtjCXX8nWPVPihwa0+tU+k2PCjH11VBq/NUOwUkWJJgNR/uIe TAMB3Ryzw5evFax80rKqWzfJnMs/tl0KBwom+dKsp+cyBB6bLuZnl3Kc1hh20SrP8sEM A1tWdeirJVA0ucP6nlvUPmBBsaodVTZz0HG+9ANJNIwYej4eZenPvIRFP1rQKdsb7xKm /OOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443343; x=1709048143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jrtujh/LnXfvYMR2N2cwo9zSO80+VM2HiXhsn02tIjQ=; b=aTSXVC70E1sIPygLxVRgAaLnkPpcP8fAZJgBCtsXW/ge4AkQvYI1j5HUI7XDCeX7+m AccQKVIGupU5+Vy2/pn9gLhxeT3XW8f0RFTdmj0EJplXspBO64koWU84oqkIZOnYt354 hHY9kwdDGnDvmmEjSIPBujQKYw3WLSfvFd19EX/QajbW0zGefS7R6NYKU2TZLPq5OG7g GzKQlBpKdkYzWvMUM7cP+sFO70UA06JIoJDnHiFWcaf4H/7MVpKMvx3NuAU9/ixBjRY0 5Fv7QKNaFVyDpyBBVXoV/ZMdrTORIFyHCGQfpRzoDOCSj1GHmToinMCSMGhPt/FDF61U 75ZA== X-Forwarded-Encrypted: i=1; AJvYcCU73Rq+gSGgsOMgfsomxEGZdoEqQTTtiFm5phMLtBQci84VFnWtRfo5x5p4JbHYjW1iJ0YzK5+IjNq/STQcVyT2mW+LiBIymwnoI5PlPtG5 X-Gm-Message-State: AOJu0YzqiOPpKV4da69jBy7cNN8LlHRm1AR7TbNOuhK/upnxLxHaE1VW U4mnE5VxJIPlqrr52RWMoli1nDHuc/N6cw7tczWtK1l2uoNiORekwL1U1pdGJWE= X-Google-Smtp-Source: AGHT+IFDWLykrLrTZHAk/OiKu/p48Obi7ksW8/C3NaF3BGJJllJTfI+C8R5qCg4lbmEjSwL/2SNd8Q== X-Received: by 2002:a05:600c:3ac8:b0:412:6ebe:9ecd with SMTP id d8-20020a05600c3ac800b004126ebe9ecdmr2032288wms.3.1708443343086; Tue, 20 Feb 2024 07:35:43 -0800 (PST) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b004126ec2f541sm2444905wmo.0.2024.02.20.07.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:35:41 -0800 (PST) From: Daniel Thompson To: Lee Jones , Jingoo Han Cc: Daniel Thompson , Luca Weiss , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 1/4] backlight: da9052: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:24 +0000 Message-ID: <20240220153532.76613-2-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153532.76613-1-daniel.thompson@linaro.org> References: <20240220153532.76613-1-daniel.thompson@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" props is stack allocated and the fields that are not explcitly set by the probe function need to be zeroed or we'll get undefined behaviour (especially so power/blank states)! Fixes: 6ede3d832aaa ("backlight: add driver for DA9052/53 PMIC v1") Signed-off-by: Daniel Thompson --- drivers/video/backlight/da9052_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c index 1cdc8543310b4..b8ff7046510eb 100644 --- a/drivers/video/backlight/da9052_bl.c +++ b/drivers/video/backlight/da9052_bl.c @@ -117,6 +117,7 @@ static int da9052_backlight_probe(struct platform_device *pdev) wleds->led_reg = platform_get_device_id(pdev)->driver_data; wleds->state = DA9052_WLEDS_OFF; + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.max_brightness = DA9052_MAX_BRIGHTNESS; From patchwork Tue Feb 20 15:35:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 13564187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4CDCBC48BC3 for ; Tue, 20 Feb 2024 15:35:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D3F310E4C6; Tue, 20 Feb 2024 15:35:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gYeTg/qC"; dkim-atps=neutral Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 751B610E4C0 for ; Tue, 20 Feb 2024 15:35:45 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-41272d44adcso568835e9.3 for ; Tue, 20 Feb 2024 07:35:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443343; x=1709048143; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dg9eYBATJE28KVVYL5JHYrMeYFjWDGTymWB+eHLR51Y=; b=gYeTg/qCuxUvG90WZB1W213MOFSlqTnT8OxUO7pVYjXLYml66JIEDNWJhBR5t2FIXX oP8gJPLORgVkkW1/DwzDFvzmsFOESRMCO5PGfJoYm3CM5/PNDax+WxDNRaH2iJlmaqqx bvUsMmIQnyiNyFn8KSbdMiOLWZxZ1af4/vURM0pCUptLO6XO+evU7p+Z3PnQQSiIcyxG 8y4Sz86XKSFlrafZZWOrPX232wCFOncAEoY0GzxgsNBTeRac9fTI/AKHVHbH1vGYdr39 ZFiXBuVEohXCpHOzVKsY16SkOv0VuBGVWl5cpEwsYCsndFrPG97r7xykmg46fHJyRtjs oyag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443343; x=1709048143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dg9eYBATJE28KVVYL5JHYrMeYFjWDGTymWB+eHLR51Y=; b=KWltMdUB7Y7nL5GSIfx8S2SmrYLwzXW3NObwQeGLmksnTyzCH1ZjldNbu0wnrj9Hfu wLAC5/lcftPyOJZlznnNFxon+tKjd2cVRfyWDbKI3IhoKMn/RLRBpCjEwKRtTVkerlWK VenCYxFgjBb8ntPmdT/5vzCJK8ouzVmiQYT3D1sATdQbDOfJ682ksL09i9rJ0B5vaGWI K/l4Km2p41ZpKn8cNdnL9IGDCh4iscaACKZMX9HCHB1NbBjlQdyKBwGFaxdi9sCBFt/C QG+2LgLnqFRKZmL0f1rgxMQgr0jx2EB2JTGiy9cAhrHDRGmH5vMC2b7rUb1qzD/E4NC7 AGKQ== X-Forwarded-Encrypted: i=1; AJvYcCWDZ1M3WpapU7ABF68Fd1x9Mrz1vBMd9LB5I/j1+kO0THV7aFbBwrrTYlSxQ3Jt5lR0RXMfWY2cgo0vDs3SH9KE2i0JySAhZ9KhvIogOXyq X-Gm-Message-State: AOJu0Yx0l9FDI6fXpVwXgacrudy5b61UTpyYwcIXza+fyWWhLNSB4f3g y6e/1MJHVUfxNymwv4d2c1NcgUZ4jolHFVg+NP9S8SGJRIajCDxeOHMMug+5UOs= X-Google-Smtp-Source: AGHT+IG8vq/wsIWwmwQlvm7aXyY0pdUfrR1TIk4qOIdiIiJ3ne1J8Iih0b1AG9jJ3O8+DPyJtcyN8A== X-Received: by 2002:a05:600c:1d24:b0:412:6574:c9a6 with SMTP id l36-20020a05600c1d2400b004126574c9a6mr5189419wms.2.1708443343754; Tue, 20 Feb 2024 07:35:43 -0800 (PST) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b004126ec2f541sm2444905wmo.0.2024.02.20.07.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:35:43 -0800 (PST) From: Daniel Thompson To: Lee Jones , Jingoo Han Cc: Daniel Thompson , Luca Weiss , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/4] backlight: lm3639: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:25 +0000 Message-ID: <20240220153532.76613-3-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153532.76613-1-daniel.thompson@linaro.org> References: <20240220153532.76613-1-daniel.thompson@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" props is stack allocated and the fields that are not explcitly set by the probe function need to be zeroed or we'll get undefined behaviour (especially so power/blank states)! Fixes: 0f59858d5119 ("backlight: add new lm3639 backlight driver") Signed-off-by: Daniel Thompson --- drivers/video/backlight/lm3639_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c index 5246c171497d6..564f62acd7211 100644 --- a/drivers/video/backlight/lm3639_bl.c +++ b/drivers/video/backlight/lm3639_bl.c @@ -338,6 +338,7 @@ static int lm3639_probe(struct i2c_client *client) } /* backlight */ + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_RAW; props.brightness = pdata->init_brt_led; props.max_brightness = pdata->max_brt_led; From patchwork Tue Feb 20 15:35:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 13564186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97FF5C5475B for ; Tue, 20 Feb 2024 15:35:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 964B310E4C4; Tue, 20 Feb 2024 15:35:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="QA2sUlsI"; dkim-atps=neutral Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 296EA10E4C0 for ; Tue, 20 Feb 2024 15:35:46 +0000 (UTC) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-41271096976so3384605e9.2 for ; Tue, 20 Feb 2024 07:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443344; x=1709048144; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CcW5EHUKgbIlTJ9AkvlcTH/1qNEKLD/WUfYuV6zpMeg=; b=QA2sUlsIsHmlmVKk+UEwVF54LL403Zydcj9yHH+o7/566UJIWxg3UPW0URAVOSRw9H 5FmR1Wi+jjmENlJBkL+mY7GyBt4RjQxdxtDsmKmFIr44QcOSD3FfBEySx344ZQv/KhtV yKIWPkcOykC4QSD9DeU2M/gwhvFS/FUQ/Blo/jMI53e92ckZ4ta/Tj9ZoRiD/Sk8kyIv n+LXxtm9p6gAUAPiJFPZbvqpac30CUrBsfHcOdjrAkS9r7hyXPoA9ckvj6781lmQ48j6 qwG71k9r75uetXMUanfHbYOuxdMf3fBAAfvfcChNxtdnEjZvuuw98RMAZlDsk92KONAW FRDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443344; x=1709048144; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CcW5EHUKgbIlTJ9AkvlcTH/1qNEKLD/WUfYuV6zpMeg=; b=NzOeUBPzcIpKTrHBY2CySIINY/HG+Gi3QG5sbTFdRPoO0Ij5DXpRHrxjPEWKXHwQBG L5HNuqn5IcuAKQpXZH2xwjZRE7ThAmqHTN9KcDwSGM2PVWX++PLSAf143R6FSsOMwxEv s03Gobe9tQLYU8TS6JD9m1gL2sq7Yp/aH7NA1kemInDlfrf7XtgwTSLOwQLnBnTgfvaY 4n+KOn+DrotHZtjFcpineCeGsDVq+H0lIdbgoHcrNoYJMLBBD4DinK4Lpi1f1//OelYE pnu/914PbtZ50EfS0zHpKvWSFW9QMrZKaOKm2tZ8HCVxMLMMsj0tGyKdx+B+vb4ZzT1l awPw== X-Forwarded-Encrypted: i=1; AJvYcCWm+F6jtj2CTAoesEA9ZULPZjQdbrkTJSvZP2qMdcjDq3Y69FC5Up6pbDbFGB6xi9bVRjqBcd5dSbX9qiM1Bq2pFCIXQOU770fNZ+uYHB2o X-Gm-Message-State: AOJu0Yyc/b4T6A2igOqNqWm7bxa4M6Fk1kl1xuCgm8jbdnGUFZeOxf7d Sel+8dOkX5r1LDuiY6X7oDeNHkcNEh7/CxIHe0kD5jyE3ubgQ/i/DOIky0c3l/g= X-Google-Smtp-Source: AGHT+IEpCXV6NsmkOJ9aSe37i5U0I9NvAzq/Dog4zLeK5T/NulYxyznqCpuNmqivjX1f01yhov8nMw== X-Received: by 2002:a05:600c:314b:b0:412:71fb:7732 with SMTP id h11-20020a05600c314b00b0041271fb7732mr408200wmo.38.1708443344393; Tue, 20 Feb 2024 07:35:44 -0800 (PST) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b004126ec2f541sm2444905wmo.0.2024.02.20.07.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:35:44 -0800 (PST) From: Daniel Thompson To: Lee Jones , Jingoo Han Cc: Daniel Thompson , Luca Weiss , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 3/4] backlight: lp8788: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:26 +0000 Message-ID: <20240220153532.76613-4-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153532.76613-1-daniel.thompson@linaro.org> References: <20240220153532.76613-1-daniel.thompson@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" props is stack allocated and the fields that are not explcitly set by the probe function need to be zeroed or we'll get undefined behaviour (especially so power/blank states)! Fixes: c5a51053cf3b ("backlight: add new lp8788 backlight driver") Signed-off-by: Daniel Thompson --- drivers/video/backlight/lp8788_bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c index d1a14b0db265b..31f97230ee506 100644 --- a/drivers/video/backlight/lp8788_bl.c +++ b/drivers/video/backlight/lp8788_bl.c @@ -191,6 +191,7 @@ static int lp8788_backlight_register(struct lp8788_bl *bl) int init_brt; char *name; + memset(&props, 0, sizeof(struct backlight_properties)); props.type = BACKLIGHT_PLATFORM; props.max_brightness = MAX_BRIGHTNESS; From patchwork Tue Feb 20 15:35:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 13564185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B543EC48BC3 for ; Tue, 20 Feb 2024 15:35:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32C0310E4C1; Tue, 20 Feb 2024 15:35:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="yXd3NA+c"; dkim-atps=neutral Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62B4310E4C0 for ; Tue, 20 Feb 2024 15:35:47 +0000 (UTC) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4127109686fso3122995e9.2 for ; Tue, 20 Feb 2024 07:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708443345; x=1709048145; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YwLWP4/vhF0uIJPtwS5+bkpQQd9v2zac6pd8EH25YT0=; b=yXd3NA+cWVP6g9mR7FHt2PBL/aCBa9+Mp1HZkR2PHxyoyorcIm5N4mrjnO4l8TQq7W 9SLURqQGxOgtu5F/FK6y+hngQ9FuH1Ui3s6VHP6et/6m/QaEXfthmNijqEQVUJMu4rfi JT6T9mLwhtHcGJJ0YrWLdb/zqrmefyfjC6u1MkJLpYWVoKj0EiXtjCbEe8ma4cMIND9U QceawENT40qwaXZO1d/bvXlXrZQc5z/pMCGG0s7ukcCUIRoleL01HiQTmgdS0RyVxFQc bb/J43Ygc6zb/uCW5IHpMXzAEVGghbFV0671nBmptVassut0AV8jwBC0hJiwe9kXfdzi 5BtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708443345; x=1709048145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YwLWP4/vhF0uIJPtwS5+bkpQQd9v2zac6pd8EH25YT0=; b=pD+H9h9wJbrdr3hvJG2/vjk/obPsgBGP/+xF3cTAv16/ieKKL9ylEoe6cK1LBYdBwO Tj5bb2WklD+Uc7jQPVHUVQi+mzsRviQC7cAGQm9Op+CnZF/2bwGbnD76cwsTCwiEiqgw MTsw625DL4DCQ6qqEERKprHoRRZ280KUbYGnqEYjDBdHqv2ajZRRb6uHf2oZYjHhHGLQ 6w+KK8tEx0RKohPRqxri/zL5aohrZsf9DjDd6ork1jIHUTeLLLandFZfs7kNSokI9ONZ W9jsxpqLP/zLm0wnyEgUAGAIEHUPu1qLL0Yb2cvCwYfdx5uqW7Ex4W+L/Qk/11u6o563 7U3A== X-Forwarded-Encrypted: i=1; AJvYcCWTdz4rkHBLp2Q7p1yRHxfA+VIRWTfm/FYEXPEf//Vs7mS+z2WyqPoKQNZC15QkuBendRk1ttkcslydbjLH8tOztgXysdH0vnt0zl/7ZPZ2 X-Gm-Message-State: AOJu0YxYUuF/lXJj30IfbW/zh04My8Wv6kcthxkbH4GMPX2jUC1wEktO 2XTaShDxvDpn60CGebmqbnZJ9ELog9LQlUs8tVFFgSUQSRPEUvIzHMq69i9gglw= X-Google-Smtp-Source: AGHT+IEMn5UIvIGN8ynNgBG1UECcP3133jvG/f9Bq3NQkmhEynvf2+SdDbQmpD5zbEoioW5xKTd9vA== X-Received: by 2002:a5d:414e:0:b0:33d:1427:5274 with SMTP id c14-20020a5d414e000000b0033d14275274mr10295254wrq.52.1708443345703; Tue, 20 Feb 2024 07:35:45 -0800 (PST) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id g8-20020a05600c310800b004126ec2f541sm2444905wmo.0.2024.02.20.07.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 07:35:44 -0800 (PST) From: Daniel Thompson To: Lee Jones , Jingoo Han Cc: Daniel Thompson , Luca Weiss , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 4/4] backlight: mp3309c: Fully initialize backlight_properties during probe Date: Tue, 20 Feb 2024 15:35:27 +0000 Message-ID: <20240220153532.76613-5-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220153532.76613-1-daniel.thompson@linaro.org> References: <20240220153532.76613-1-daniel.thompson@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" props is stack allocated and, although this driver initializes all the fields that are not "owned" by the framework, we'd still like to ensure it is zeroed to avoid problems from this driver if the fields change. Signed-off-by: Daniel Thompson --- drivers/video/backlight/mp3309c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c index 34d71259fac1d..cdf302d6f1cb5 100644 --- a/drivers/video/backlight/mp3309c.c +++ b/drivers/video/backlight/mp3309c.c @@ -373,6 +373,7 @@ static int mp3309c_probe(struct i2c_client *client) chip->pdata = pdata; /* Backlight properties */ + memset(&props, 0, sizeof(struct backlight_properties)); props.brightness = pdata->default_brightness; props.max_brightness = pdata->max_brightness; props.scale = BACKLIGHT_SCALE_LINEAR;