From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 72208385840C for ; Thu, 12 Oct 2023 12:32:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72208385840C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697113949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=wzvqaVTVf4emIM96i3i2TxmIV0pc2f35r3l+TDAOcHg=; b=J9bGRxdP7APttbsZwOEY84BlwsfdD8dAV4u8kj1gXttmyVjYINqTsEqUwBkD05RqiOZT8/ +Ps5UsUM8PdqR/qObY9DJ8Xn4F+WGXPN7tO2N56tEEmGQQ4Ndlc9iHeAq5tM1jt5wTVMry TEkQ1LPs/3QKgpg89X6DYysVVx9dT80= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-674-FWfzkSNeNyOqjjNRHJvCOQ-1; Thu, 12 Oct 2023 08:32:27 -0400 X-MC-Unique: FWfzkSNeNyOqjjNRHJvCOQ-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4197fa36adaso8462321cf.1 for ; Thu, 12 Oct 2023 05:32:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697113947; x=1697718747; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wzvqaVTVf4emIM96i3i2TxmIV0pc2f35r3l+TDAOcHg=; b=pedfiw+dmaFWClSpO7Nseck0fr/D4TGihC1cNMUx1/TdVi6nKMYYn+ghtxrHSBd9I5 vAdzV5PP/puKA3nN+y6XvJBskC2xRlUjC7DhsZIbD3ir9Rx5/EkIfQZXBQRx5PKpyUt8 3EqacE8chD7FjPAuaNn5mnpNAKD8JmDSF1aTc3L1tKlXId3Io+tvIhPcNWQe19a1BSzl SYHukw1ltrXu2a1RMQKWvM1fgwhm57UGKel6hGl2edAx2y9Rv+9+9qYWfcUV2TnQTmTE Pu+/JdkA7UcWpdGwMT4WuSsiLPIUNUKLRQ9QRtvQKZxU7wFPDXkZKnxI6jPuWRS2Ru19 bd7Q== X-Gm-Message-State: AOJu0YxxItvrDTh3uwswlAfNjr027L817qfwxOjw4eWq5xwHY+9LWLPO LI/0DDnx4HXYBzAgNenw9Y7LSfUuGXBvTzeu4lGKCDIJKjzNHG9y3QqCdhcLhBa7BA51nuKlNmg W25Jzl8sgg1hg/SSpgw== X-Received: by 2002:a05:622a:1709:b0:412:24e6:a485 with SMTP id h9-20020a05622a170900b0041224e6a485mr22045326qtk.2.1697113947352; Thu, 12 Oct 2023 05:32:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE4HmfvKAdfqPEpF1GSCt1fOYsAwgmuMa5NFDAspvKZTBjjJfsIViS+Gr7BEUv8EgsG2ZcFIA== X-Received: by 2002:a05:622a:1709:b0:412:24e6:a485 with SMTP id h9-20020a05622a170900b0041224e6a485mr22045311qtk.2.1697113947072; Thu, 12 Oct 2023 05:32:27 -0700 (PDT) Received: from [192.168.1.11] ([80.168.197.243]) by smtp.gmail.com with ESMTPSA id d9-20020a05620a166900b00773fe8971bbsm5992992qko.90.2023.10.12.05.32.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Oct 2023 05:32:26 -0700 (PDT) Message-ID: Date: Thu, 12 Oct 2023 13:32:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] bfd: add new bfd_cache_size() function To: Andrew Burgess , binutils@sourceware.org References: <6bd18d16-728f-88c8-c31d-83a9f594a752@redhat.com> <875y3dclp9.fsf@redhat.com> From: Nick Clifton Autocrypt: addr=nickc@redhat.com; keydata= xsFNBFm/2cUBEADkvRqMWfAryJ52T4J/640Av5cam9ojdFih9MjcX7QWFxIzJfTFYq2z+nb4 omdfZosdCJL2zGcn6C0AxpHNvxR9HMDkEyFHKrjDh4xWU+pH4z9azQEqJh331X7UzbZldqQo 16VkuVavgsTJaHcXm+nGIBTcUbl2oiTtHhmuaYxx6JTMcFjC7vyO5mLBw78wt52HBYweJ0Nj HBvvH/JxbAAULSPRUC61K0exlO49VFbFETQNG1hZTKEji95fPbre7PpXQ0ewQShUgttEE/J3 UA4jYaF9lOcZgUzbA27xTV//KomP0D30yr4e4EJEJYYNKa3hofTEHDXeeNgM25tprhBUMdbV RZpf2Keuk2uDVwc+EiOVri48rb1NU+60sOXvoGO6Ks81+mhAGmrBrlgLhAp8K1HPHI4MG4gH nrMqX2rEGUGRPFjC3qqVVlPm8H05PnosNqDLQ1Pf7C0pVgsCx6hKQB7Y1qBui7aoj9zeFaQg pYef+CEERIKEcWwrjaOJwK3pi9HFdxS0NNWYZj8HPzz/AsgTTQdsbulPlVq2SsctmOnL42CZ OCTppGYwl53CG/EqVY+UQBzFzJBaY8TJRFFYVEy5/HH4H11rMoZwqIkk71EOGU3X6mWlANRi kR3M4GhVITRzuaV69Fed+OeXcCmP94ASLfuhBR2uynmcHpBKpwARAQABzTtOaWNrIENsaWZ0 b24gKENoaWVmIEJpbnV0aWxzIE1haW50YWluZXIpIDxuaWNrY0ByZWRoYXQuY29tPsLBeAQT AQIAIgUCWb/ZxQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQE/zvid2ePE9cOxAA 3cX1bdDaTFttTqukdPXL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 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Andrew, >> So if bfd_cache_size() returns an unsigned int then bfd_cache_max_open() >> should as well, and the files_open and max_files_open variables should >> be changed as well. >> >> Of course in practice we should never see negative values or large values >> for any of these variables/function-results, so using an "int" should be >> just fine. But it bugs me that functions and variables which should never >> have negative values are being typed as if they could have them. > > Ask and you shall receive! > > How's the patch below? This applies onto current HEAD without my > bfd_cache_size patch and makes the int -> unsigned changes you suggest. Excellent - that is exactly what I had in mind. > I would then update my bfd_cache_size patch to return unsigned -- but > I'll just go ahead and merge the updated version assuming this patch > here is approved. It is. Please go ahead and check in both changes. Cheers Nick