Re: [PATCH 2/6] soc: qcom: llcc: Refactor llcc driver to support multiple configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/08/2023 07:11, Komal Bajaj wrote:
+	if (!cfgs || cfgs->num_config != DEF_NUM_CFG) {
+		ret = -EINVAL;
+		goto err;
+	}
+	cfg = &cfgs->llcc_config[DEF_NUM_CFG - 1];

This is a bit of a redundant check.

You add in the check for num_config != 1, then deref llc_config[0] but in patch #4 you get an index and check that index against num_config

I'm not seeing how at this point in your series, how num_config could be anything other than 1.

I'd do away with the DEF_NUM_CFG define in this code/series completely.

num_config should encode all the necessary detail we need, DEF_NUM_CFG just adds noise.

---
bod



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux