Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5826714rdb; Thu, 14 Dec 2023 00:01:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQQBdVEJVREvwKOnRZYgm1hyzBvNPOBx5qvVqARWW0p7AHwT7zEoFFjnXG7MxRs76CaMbI X-Received: by 2002:a05:6a20:2926:b0:18f:97c:617f with SMTP id t38-20020a056a20292600b0018f097c617fmr9073484pzf.124.1702540862193; Thu, 14 Dec 2023 00:01:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702540862; cv=none; d=google.com; s=arc-20160816; b=ioWEshZeS3D7A+CMtNbTYJsD7J4T/imJZBo3xTQsjff+wclu7RO0eUKMxH2RdaHlbc uPN32Vy/BhWkyOxYU0wyBJ6RK7z76fwmiIQNHDOghdMmdq62zENJjFAOfbXdZ2Haz/iI 0m1ltiRALob7xF3lEvgDFpYfT9R0pLaU0CTwNGA/8HbV8bGympHEl70FZ7E88GlUjWo2 9UdXqwAL27PLtNr/gxE9nRL7xzcCvo3Jd/GFTbV2bWS0uO4QyB6HmYIBF1t5pWUfMEVG x0pqXhfUYj9CUMBUQg2NsG9r+o89y14uHSLvCt14DG3OiODbLnUKOY6C9acCLMhAIiz2 x33w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ejy3KRelhcsFDinti0drGVR8XYlKvUdp2PH4o5vy1dI=; fh=ql96xKy1rOfUvb11k09PSjVcqpdFdhqwMDOJUIshHjU=; b=uzwJHs+pqEftF7Maio297mJ6UB2KYHmZR47tk1lx1DccdPz4oKXZbKCXd7a8SKytF8 OwCvDcB5WoT3CM/g1KSouJv4aZloxxBv/RDNNDK9/UZTub6XEQ4Pvo4v7cLy7XzlZoEF eVO+We1zBltgy9NuATuH6Kron8B11olGlC6+deQ6d//Y2s6IhmQRieLBY8Iyo8Biwpgb sLZrT5tfBYkVnrYEhUJgZ0yuj3s2IoXlHKEbdFYocYWpQYxfjEkCZBXgv2D3DYjoM1En Cb9mp3XQR9XINsWN1ntpNoBPxUt7e/0c34ethOVDhQ/BeFXgDBnw/m/UY7gpj477p42Q bfPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGcEnAEI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id r12-20020a65508c000000b005c6b734bd7asi10604969pgp.821.2023.12.14.00.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 00:01:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGcEnAEI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B75DB8312AC4; Thu, 14 Dec 2023 00:00:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234383AbjLNIAr (ORCPT + 99 others); Thu, 14 Dec 2023 03:00:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbjLNIAq (ORCPT ); Thu, 14 Dec 2023 03:00:46 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20004CF for ; Thu, 14 Dec 2023 00:00:52 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40c48d7a7a7so36098995e9.3 for ; Thu, 14 Dec 2023 00:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702540850; x=1703145650; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ejy3KRelhcsFDinti0drGVR8XYlKvUdp2PH4o5vy1dI=; b=vGcEnAEI+8BP8wdATUfBYN86Hn2HAw732s67CImWRMuLjobm6B5MXBsMOGV+V0xeMi PZLapuaB31damUlenwOteHSYm/5vAsczgwcHlWTkmQcxU/Pmgnl7mPZKMoN8qTZkMh+R l7TvvPsyQ8wIptcFhYlG3b5c8BwvFyo45b9U/41CZFZxE6pnqvmbxlxeuFag+3K0xD8Y YezBjcgoPQLnNkIIobP6jG8QIi8bighJ5zIp7pN6yYtMmRJAg7VNTnSMj4xH9ve66fqz 1FaR/O/wHCdSqpuXYUg6qn5kUO6jgFdDMx5mm/GV0pJp0BrDWyJkW+khKvvlLVEnNu/I M7AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702540850; x=1703145650; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ejy3KRelhcsFDinti0drGVR8XYlKvUdp2PH4o5vy1dI=; b=VSh+fyxjooSLJM0rqWGQ7KLjFWPyppKlJ6lrnf8Z1WoPgNrUILP1N1D2WjFpxzcOC5 kNoKq5APyvKdP2k/69Iik1odLvWcyGEGPu4eDM7Vp7rwHzMxkt/y5QPIagvF1ENzciUL L7uyBlvmnntvbuf/aB/HdK2vKXJVZZbNkcpjMSPRVU+hTemLS0glIaCT4IQs3hoSBCgV 7sMwoQ2GRuDPyW6+2XL7Ii6hjaf+2xm7Z06fQiSeqVrw/Y+rYJmw8SgJlMd9bqkoQxxY k4lLJc4vzCbJYKucAJBcmPLvkaNTm3yrJYWir89VSdjE/+3GDnOHVOgpkNGU/Bh71+6v /QjQ== X-Gm-Message-State: AOJu0YzGSJsO9qgjs6AUBSnHwkfE3OtgTIcSG2k5OUA/5rEHADSWDxot oWoPqNo322LaQQ2YN8i7R//0Kg== X-Received: by 2002:a05:600c:2257:b0:40c:314c:803e with SMTP id a23-20020a05600c225700b0040c314c803emr5582837wmm.106.1702540850506; Thu, 14 Dec 2023 00:00:50 -0800 (PST) Received: from localhost ([102.140.209.237]) by smtp.gmail.com with ESMTPSA id r20-20020a05600c459400b0040b349c91acsm25653160wmo.16.2023.12.14.00.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 00:00:50 -0800 (PST) Date: Thu, 14 Dec 2023 11:00:46 +0300 From: Dan Carpenter To: Charlie Jenkins Cc: oe-kbuild@lists.linux.dev, lkp@intel.com, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Palmer Dabbelt Subject: Re: arch/riscv/kernel/module.c:639 process_accumulated_relocations() error: uninitialized symbol 'curr_type'. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 14 Dec 2023 00:00:59 -0800 (PST) On Wed, Dec 13, 2023 at 11:27:02AM -0800, Charlie Jenkins wrote: > > 8fd6c5142395a1 Charlie Jenkins 2023-11-01 638 } > > 8fd6c5142395a1 Charlie Jenkins 2023-11-01 @639 reloc_handlers[curr_type].accumulate_handler( > > ^^^^^^^^^ > > Can the list be empty? Uninitialized in that case. > > That's a tricky one, the list cannot be empty. Each bucket in the > bucket_iter is guarunteed to have at least one rel_entry. I can probably > resolve this by extracting this for loop into a do-while loop. You can just ignore false positives. It's not really a fix to change it to a do-while loop. I reviewed the do while code before reading this email and I still wondered about empty lists, but just to hear that it's not going to be empty is enough. Just the email was sufficient. regards, dan carpenter