Thread (28 messages) 28 messages, 2 authors, 2019-07-01

Re: [PATCH v2 net-next 04/19] ionic: Add basic lif support

From: Shannon Nelson <hidden>
Date: 2019-07-01 18:00:29


On 6/29/19 11:45 AM, Jakub Kicinski wrote:
On Fri, 28 Jun 2019 14:39:19 -0700, Shannon Nelson wrote:
quoted
@@ -64,4 +66,49 @@ int ionic_debugfs_add_ident(struct ionic *ionic)
  				   ionic, &identity_fops) ? 0 : -ENOTSUPP;
  }
  
+int ionic_debugfs_add_sizes(struct ionic *ionic)
+{
+	debugfs_create_u32("nlifs", 0400, ionic->dentry,
+			   (u32 *)&ionic->ident.dev.nlifs);
+	debugfs_create_u32("nintrs", 0400, ionic->dentry, &ionic->nintrs);
+
+	debugfs_create_u32("ntxqs_per_lif", 0400, ionic->dentry,
+			   (u32 *)&ionic->ident.lif.eth.config.queue_count[IONIC_QTYPE_TXQ]);
+	debugfs_create_u32("nrxqs_per_lif", 0400, ionic->dentry,
+			   (u32 *)&ionic->ident.lif.eth.config.queue_count[IONIC_QTYPE_RXQ]);
Are these __le32s?  Does the driver build cleanly with W=1 C=1?
Aside from a couple of "expression using sizeof(void)" messages that I 
haven't been able to fully clean out, yes, the driver builds pretty 
clean with sparse.  In this particular case, I think the typecast stops 
the complaint that you are expecting here.  But yes, these would be 
better off with le32_to_cpu().

sln
quoted
+	return 0;
+}
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help