Commit 8ed1045b authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-ipa-little-fixes'

Alex Elder says:

====================
net: ipa: little fixes

This series adds a few small fixes to the IPA code.

The first patch appeared in a different form in June, and got some
pushback from David because he felt a problem that can be caught at
build time *should* be caught at build time.
  https://lore.kernel.org/netdev/20200610195332.2612233-1-elder@linaro.org/
I agree with that, but in this case the "problem" was never actually
a problem.  There's a little more explanation on the patch, but
basically now we remove the BUILD_BUG_ON() call entirely.

The second deletes a line of code that isn't needed.

The third converts a warning message to be a debug, as requested by
Stephen Boyd.

And the last one just gets rid of an error message that would be
output after a different message had already reported a problem.
====================

Link: https://lore.kernel.org/r/20201109165635.5449-1-elder@linaro.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 70408949 bf795af1
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -1661,12 +1661,7 @@ static int gsi_modem_channel_alloc(struct gsi *gsi, u32 channel_id)

static void gsi_modem_channel_halt(struct gsi *gsi, u32 channel_id)
{
	int ret;

	ret = gsi_generic_command(gsi, channel_id, GSI_GENERIC_HALT_CHANNEL);
	if (ret)
		dev_err(gsi->dev, "error %d halting modem channel %u\n",
			ret, channel_id);
	(void)gsi_generic_command(gsi, channel_id, GSI_GENERIC_HALT_CHANNEL);
}

/* Setup function for channels */
+1 −5
Original line number Diff line number Diff line
@@ -335,7 +335,6 @@ static void ipa_hardware_config(struct ipa *ipa)
	ipa_hardware_config_qsb(ipa);

	/* Configure aggregation granularity */
	val = ioread32(ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET);
	granularity = ipa_aggr_granularity_val(IPA_AGGR_GRANULARITY);
	val = u32_encode_bits(granularity, AGGR_GRANULARITY);
	iowrite32(val, ipa->reg_virt + IPA_REG_COUNTER_CFG_OFFSET);
@@ -680,9 +679,6 @@ static void ipa_validate_build(void)
	 */
	BUILD_BUG_ON(GSI_TLV_MAX > U8_MAX);

	/* Exceeding 128 bytes makes the transaction pool *much* larger */
	BUILD_BUG_ON(sizeof(struct gsi_trans) > 128);

	/* This is used as a divisor */
	BUILD_BUG_ON(!IPA_AGGR_GRANULARITY);

@@ -790,7 +786,7 @@ static int ipa_probe(struct platform_device *pdev)
	if (ret)
		goto err_mem_exit;

	/* Result is a non-zero mask endpoints that support filtering */
	/* Result is a non-zero mask of endpoints that support filtering */
	ipa->filter_map = ipa_endpoint_init(ipa, data->endpoint_count,
					    data->endpoint_data);
	if (!ipa->filter_map) {
+4 −4
Original line number Diff line number Diff line
@@ -160,13 +160,13 @@ int ipa_mem_config(struct ipa *ipa)
	mem_size = 8 * u32_get_bits(val, SHARED_MEM_SIZE_FMASK);

	/* If the sizes don't match, issue a warning */
	if (ipa->mem_offset + mem_size > ipa->mem_size) {
		dev_warn(dev, "ignoring larger reported memory size: 0x%08x\n",
			mem_size);
	} else if (ipa->mem_offset + mem_size < ipa->mem_size) {
	if (ipa->mem_offset + mem_size < ipa->mem_size) {
		dev_warn(dev, "limiting IPA memory size to 0x%08x\n",
			 mem_size);
		ipa->mem_size = mem_size;
	} else if (ipa->mem_offset + mem_size > ipa->mem_size) {
		dev_dbg(dev, "ignoring larger reported memory size: 0x%08x\n",
			mem_size);
	}

	/* Prealloc DMA memory for zeroing regions */